currentRequestPath = new QueryStringDecoder(currentRequest.getUri(), ENCODING).path(); currentDecoder = new HttpPostRequestDecoder(DATA_FACTORY, currentRequest, ENCODING);
private void respondNotFound(ChannelHandlerContext channelHandlerContext, HttpRequest request) { LOG.trace("Request could not be routed to any handler. Uri:{} Method:{}", request.getUri(), request.getMethod()); HandlerUtils.sendErrorResponse( channelHandlerContext, request, new ErrorResponseBody("Not found."), HttpResponseStatus.NOT_FOUND, responseHeaders); } }
private void respondNotFound(ChannelHandlerContext channelHandlerContext, HttpRequest request) { LOG.trace("Request could not be routed to any handler. Uri:{} Method:{}", request.getUri(), request.getMethod()); HandlerUtils.sendErrorResponse( channelHandlerContext, request, new ErrorResponseBody("Not found."), HttpResponseStatus.NOT_FOUND, responseHeaders); } }
@Override protected void respondAsLeader(ChannelHandlerContext ctx, Routed routed, T gateway) throws Exception { if (log.isTraceEnabled()) { log.trace("Received request " + routed.request().getUri() + '.');
currentRequestFailed = false; final HttpRequest httpRequest = (HttpRequest) msg; LOG.trace("Received request. URL:{} Method:{}", httpRequest.getUri(), httpRequest.getMethod()); if (httpRequest.getMethod().equals(HttpMethod.POST)) { if (HttpPostRequestDecoder.isMultipart(httpRequest)) {
if (msg instanceof HttpRequest) { final HttpRequest httpRequest = (HttpRequest) msg; LOG.trace("Received request. URL:{} Method:{}", httpRequest.getUri(), httpRequest.getMethod()); if (httpRequest.getMethod().equals(HttpMethod.POST)) { if (HttpPostRequestDecoder.isMultipart(httpRequest)) {
if (msg instanceof HttpRequest) { final HttpRequest httpRequest = (HttpRequest) msg; LOG.trace("Received request. URL:{} Method:{}", httpRequest.getUri(), httpRequest.getMethod()); if (httpRequest.getMethod().equals(HttpMethod.POST)) { if (HttpPostRequestDecoder.isMultipart(httpRequest)) {
currentRequestPath = new QueryStringDecoder(currentRequest.getUri(), ENCODING).path(); currentDecoder = new HttpPostRequestDecoder(DATA_FACTORY, currentRequest, ENCODING);
currentRequestPath = new QueryStringDecoder(currentRequest.getUri(), ENCODING).path(); currentDecoder = new HttpPostRequestDecoder(DATA_FACTORY, currentRequest, ENCODING);