try {
MappedRequest mappedRequest = new MappedRequest(request);
if (connectSocket != null && mappedRequest.method().equals(HttpMethod.CONNECT)) {
ctx.pipeline().addAfter(ctx.name(), HttpConnectHandler.class.getSimpleName(), new HttpConnectHandler(connectSocket, true));
ctx.pipeline().remove(this);
ctx.fireChannelRead(request);
} else if (mappedRequest.matches(HttpMethod.PUT, "/dumpToLog")) {