Skip to content

Commit

Permalink
* modules/http/http_filters.c (parse_chunk_size):
Browse files Browse the repository at this point in the history
  Update comment after some investigation of a Squid interoperability
  issue handling BWS after chunk-size, which httpd allows although
  it is not permitted by RFC 7230 or RFC 9112. [skip ci]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921254 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Oct 11, 2024
1 parent c717758 commit 914eef0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/http/http_filters.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,15 @@ static apr_status_t parse_chunk_size(http_ctx_t *ctx, const char *buffer,
}
}
else if (c == ' ' || c == '\t') {
/* Be lenient up to 10 implied *LWS, a legacy of RFC 2616,
* and noted as errata to RFC7230;
/* This allows limited BWS (or 'implied *LWS' in RFC2616
* terms) between chunk-size and '[chunk-ext] CRLF'. This
* is not allowed by RFC7230/9112 though servers have been
* seen which emit spaces here. The code previously (and
* mistakenly?) referenced the 7230 errata concerning BWS
* *within* chunk-ext, but the conditional above is
* followed during chunk-ext (state BODY_CHUNK_EXT):
* https://www.rfc-editor.org/errata_search.php?rfc=7230&eid=4667
* See also: https://github.com/squid-cache/squid/pull/1914
*/
ctx->state = BODY_CHUNK_CR;
if (++ctx->chunk_bws > 10) {
Expand Down

0 comments on commit 914eef0

Please sign in to comment.