You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2024/10/11 07:32:05 UTC

svn commit: r1921254 - /httpd/httpd/trunk/modules/http/http_filters.c

Author: jorton
Date: Fri Oct 11 07:32:05 2024
New Revision: 1921254

URL: http://svn.apache.org/viewvc?rev=1921254&view=rev
Log:
* modules/http/http_filters.c (parse_chunk_size): 
  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]

Modified:
    httpd/httpd/trunk/modules/http/http_filters.c

Modified: httpd/httpd/trunk/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?rev=1921254&r1=1921253&r2=1921254&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_filters.c (original)
+++ httpd/httpd/trunk/modules/http/http_filters.c Fri Oct 11 07:32:05 2024
@@ -189,9 +189,15 @@ static apr_status_t parse_chunk_size(htt
             }
         }
         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) {