@Override
    protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) throws Exception {
        // Chunked transfer encoding is used to stream back results so only accept HTTP/1.1 requests.
        if (msg.protocolVersion() != HTTP_1_1) {
            HttpHandlerUtil.sendError(ctx, HTTP_VERSION_NOT_SUPPORTED, "Only HTTP/1.1 is supported.");
            ReferenceCountUtil.release(msg);
            return;
        }

        if ("/favicon.ico".equals(msg.uri())) {
            HttpHandlerUtil.sendError(ctx, NOT_FOUND, "Gremlin Server doesn't have a favicon.ico");
            ReferenceCountUtil.release(msg);
            return;
        }

        ctx.fireChannelRead(msg);
    }
A handler that checks for errors in the HTTP request for all routes.
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpRequestCheckingHandler.java