Skip to content

core: Process HTTP/1.x requests with a higher minor version like HTTP… - #820

Open
arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-h1-higher-minor-version
Open

arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-h1-higher-minor-version

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

…/1.1.

BZ: https://bz.apache.org/bugzilla/show_bug.cgi?id=70361

h1_post_read_request() added the HTTP1_BODY_IN filter only for proto_num <= 1.1, so a request such as "GET / HTTP/1.2" held its worker until the request body timeout and was then answered 408. Use the major version, as RFC 9110 section 2.5 requires.

A request line with another major version on an HTTP/1 connection, e.g. "GET / HTTP/2.0", stalled the same way. It is still an HTTP/1 message, so it is processed as HTTP/1.1 too, as 2.4.x does and as the http_strict tests (perl framework and pytest_suite) expect: r->proto_num is set to 1.1, so keep-alive and the body follow HTTP/1.1 as well, and r->protocol keeps the version the client sent. Requests on HTTP/2 and HTTP/3 connections are not affected.


  • [ X] This PR does not report or address a security vulnerability
    (see SECURITY.md and
    https://www.apache.org/security/#reporting-a-vulnerability).
  • [ X] Code follows the httpd style guide.
  • [ X] New log messages (level debug or higher) use an empty APLOGNO() tag;
    numbers are assigned by a committer at merge time (see docs/log-message-tags/README).
  • [ X] If the change is user-visible, a changes-entries/*.txt file is included,
    following the template in README.CHANGES (not needed otherwise).
  • [X ] Test cases based on pyhttpd are included where appropriate, in the
    test/modules/xxx directory matching the modules/xxx module source,
    or test/modules/core for core server changes. On Unix, verify these
    pass locally with e.g. make check-pytest PYTEST_DIRS=test/modules/xxx.

@arturobernalg
arturobernalg force-pushed the fix/httpd-h1-higher-minor-version branch 2 times, most recently from 0386b99 to eb61837 Compare November 20, 2026 05:44
…/1.1.

h1_post_read_request() added the HTTP1_BODY_IN filter only for
proto_num <= 1.1, so a request such as "GET / HTTP/1.2" held its
worker until the request body timeout and was then answered 408.
Use the major version, as RFC 9110 section 2.5 requires.

A request line with another major version on an HTTP/1 connection,
e.g. "GET / HTTP/2.0", stalled the same way. It is still an HTTP/1
message: process it as HTTP/1.1, as 2.4.x does and the http_strict
tests expect, by setting r->proto_num to 1.1 so that keep-alive and
the body follow HTTP/1.1 as well. r->protocol keeps the version the
client sent. Requests on HTTP/2 and HTTP/3 connections are not
affected.

PR: 70361
@arturobernalg
arturobernalg force-pushed the fix/httpd-h1-higher-minor-version branch from eb61837 to 00de4f0 Compare November 20, 2026 06:51
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