Skip to content

Conversation

rsclarke
Copy link

Hi,

Whilst Transfer-Encoding: chunked is commonplace, RFC 7230 does permit comma separated values, in which chunked should be the last value.

This has influence on early body detection,

if (HttpUtils.hasChunkedTransferEncodingHeader(request) || HttpUtils.hasNonZeroContentLengthHeader(request)) {
request.setHasBody(true);
}

Filters implementing shouldFilter relying on request.hasBody() evaluating to true may be skipped when subsequent HTTP content arrives after initial header processing in the pipeline.

More broadly, is the presence of the "Transfer-Encoding" header sufficient to call request.setHasBody(true), rather than explicitly checking for chunked?

I initially filed this issue through HackerOne (report id 3333247) as custom security filters dependent on the body may be bypassed, but it was triaged as informative and closed by HackerOne.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant