Netflix/zuul · error

Invalid request provided: Decode failure

Error message

Invalid request provided: Decode failure

What it means

ClientRequestReceiver.channelReadInternal inspects the Netty decoderResult of each inbound HttpRequest. When the HTTP decoder failed to parse the request (malformed request line, bad headers, invalid framing), it logs a warning, sets the FAILURE_CLIENT_BAD_REQUEST status category with reason 'Invalid request provided: Decode failure', and closes the connection via RejectionUtils.rejectByClosingConnection. The faulting input is the raw HTTP request bytes from the client.

Solutions

  1. Inspect the decoderResult().cause() in the logged warning to identify the exact parsing problem
  2. Fix or upgrade the offending client that is emitting malformed HTTP
  3. If a proxy/terminator in front of Zuul rewrites requests, verify it does not corrupt the request line or headers
  4. No server-side retry is possible; the connection is closed by design
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java:148 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Netflix/zuul@14bf53c52d (2026-09-07). Data as JSON: /api/errors/91ed0fe54dd2596d. Report an issue: GitHub.

Appendix: source

Thrown at zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java:148

        }

        if (msg instanceof HttpRequest httpRequest) {
            clientRequest = httpRequest;

            zuulRequest = buildZuulHttpRequest(clientRequest, ctx);

            // Handle invalid HTTP requests.
            if (clientRequest.decoderResult().isFailure()) {
                String clientIp = Objects.requireNonNullElse(getClientIp(ctx.channel()), "unknown");
                LOG.warn(
                        "Invalid http request. clientRequest = {}, clientIp = {}, info = {}",
                        clientRequest,
                        clientIp,
                        ChannelUtils.channelInfoForLogging(ctx.channel()),
                        clientRequest.decoderResult().cause());
                StatusCategoryUtils.setStatusCategory(
                        zuulRequest.getContext(),
                        ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST,
                        "Invalid request provided: Decode failure");
                RejectionUtils.rejectByClosingConnection(
                        ctx, ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST, "decodefailure", clientRequest, null);
                return;
            } else if (zuulRequest.getContext().containsKey(CommonContextKeys.BAD_URI_REASON)) {
                String clientIp = Objects.requireNonNullElse(getClientIp(ctx.channel()), "unknown");
                String badUriReason = zuulRequest.getContext().get(CommonContextKeys.BAD_URI_REASON);
                LOG.warn(
                        "Invalid URI in request. reason = {}, clientRequest = {}, clientIp = {}, info = {}",
                        badUriReason,
                        clientRequest,
                        clientIp,
                        ChannelUtils.channelInfoForLogging(ctx.channel()));
                StatusCategoryUtils.setStatusCategory(
                        zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST, badUriReason);
                RejectionUtils.sendRejectionResponse(
                        ctx,
                        ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST,

View on GitHub (pinned to 14bf53c52d)