Skip to content

Treat the HTTP/2 Expect field value as case-insensitive - #1263

Open
arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:http2-expect-case-insensitive
Open

arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:http2-expect-case-insensitive

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

RFC 9110, section 10.1.1 says "The Expect field value is case-insensitive." HTTP/1.1 already compares 100-continue ignoring case (Http11Processor.prepareExpectation), but HTTP/2 used equals() in Stream.emitHeader. A request with Expect: 100-Continue over HTTP/2 therefore never got a 100 (Continue) response.

With curl over h2c and an 8 second expect timeout, a 200 KB POST took about 8 s with 100-Continue and a few milliseconds with 100-continue. With the change, both take a few milliseconds. httpd 2.4.69 (mod_http2) and Netty (HttpUtil.is100ContinueExpected) accept any case.

testSendAckMixedCase in TestHttp2Section_8_1 fails without the change; testSendAck checks that the lower case value still gets the 100 (Continue) response.

@arturobernalg
arturobernalg force-pushed the http2-expect-case-insensitive branch from 1be0e7f to 6dd90b1 Compare November 20, 2026 14:21
RFC 9110, section 10.1.1 defines the Expect field value as
case-insensitive. HTTP/1.1 already compares 100-continue ignoring case
but HTTP/2 did not, so no 100 (Continue) response was sent for a request
with "Expect: 100-Continue".
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