{"record":{"id":"91ed0fe54dd2596d","repo":"Netflix/zuul","slug":"invalid-request-provided-decode-failure","errorCode":null,"errorMessage":"Invalid request provided: Decode failure","messagePattern":"Invalid request provided: Decode failure","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java","lineNumber":148,"sourceCode":"        }\n\n        if (msg instanceof HttpRequest httpRequest) {\n            clientRequest = httpRequest;\n\n            zuulRequest = buildZuulHttpRequest(clientRequest, ctx);\n\n            // Handle invalid HTTP requests.\n            if (clientRequest.decoderResult().isFailure()) {\n                String clientIp = Objects.requireNonNullElse(getClientIp(ctx.channel()), \"unknown\");\n                LOG.warn(\n                        \"Invalid http request. clientRequest = {}, clientIp = {}, info = {}\",\n                        clientRequest,\n                        clientIp,\n                        ChannelUtils.channelInfoForLogging(ctx.channel()),\n                        clientRequest.decoderResult().cause());\n                StatusCategoryUtils.setStatusCategory(\n                        zuulRequest.getContext(),\n                        ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST,\n                        \"Invalid request provided: Decode failure\");\n                RejectionUtils.rejectByClosingConnection(\n                        ctx, ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST, \"decodefailure\", clientRequest, null);\n                return;\n            } else if (zuulRequest.getContext().containsKey(CommonContextKeys.BAD_URI_REASON)) {\n                String clientIp = Objects.requireNonNullElse(getClientIp(ctx.channel()), \"unknown\");\n                String badUriReason = zuulRequest.getContext().get(CommonContextKeys.BAD_URI_REASON);\n                LOG.warn(\n                        \"Invalid URI in request. reason = {}, clientRequest = {}, clientIp = {}, info = {}\",\n                        badUriReason,\n                        clientRequest,\n                        clientIp,\n                        ChannelUtils.channelInfoForLogging(ctx.channel()));\n                StatusCategoryUtils.setStatusCategory(\n                        zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST, badUriReason);\n                RejectionUtils.sendRejectionResponse(\n                        ctx,\n                        ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST,","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/Netflix/zuul/blob/14bf53c52dcf571894619ff65a674cbe2cce3ac6/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java#L130-L166","documentation":"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.","triggerScenarios":"Thrown at zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the decoderResult().cause() in the logged warning to identify the exact parsing problem","Fix or upgrade the offending client that is emitting malformed HTTP","If a proxy/terminator in front of Zuul rewrites requests, verify it does not corrupt the request line or headers","No server-side retry is possible; the connection is closed by design"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"14bf53c52dcf571894619ff65a674cbe2cce3ac6","analyzedAt":"2026-09-07T10:00:54.873Z","contentChangedAt":"2026-09-07T10:00:54.873Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}