Skip to content

Treat a 204 response to CONNECT as an established tunnel - #535

Open
ericmj wants to merge 1 commit into
http2-remove-infinity-branchesfrom
http2-connect-204
Open

ericmj wants to merge 1 commit into
http2-remove-infinity-branchesfrom
http2-connect-204

Conversation

@ericmj

@ericmj ericmj commented Oct 16, 2026

Copy link
Copy Markdown
Member

The check for 204 and 304 responses, which must not have content, came before the check for 2xx responses to CONNECT. A CONNECT request answered with 204 was treated as a response without content, so the first DATA frame on the tunnel failed the request with a protocol error.

RFC 9110 9.3.6 and RFC 9113 8.5 make any 2xx response to CONNECT establish a tunnel, so the CONNECT case is checked first and DATA frames after a 204 are delivered as tunnel data.

The check for 204 and 304 responses, which must not have content, came
before the check for 2xx responses to CONNECT. A CONNECT request
answered with 204 was treated as a response without content, so the
first DATA frame on the tunnel failed the request with a protocol error.

RFC 9110 9.3.6 and RFC 9113 8.5 make any 2xx response to CONNECT
establish a tunnel, so the CONNECT case is checked first and DATA
frames after a 204 are delivered as tunnel data.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 0

Coverage decreased (-0.2%) to 90.606%

Details

  • Coverage decreased (-0.2%) from the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • 4 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

4 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
lib/mint/http2.ex 3 95.51%
lib/mint/http1.ex 1 87.11%

Coverage Stats

Coverage Status
Relevant Lines: 2012
Covered Lines: 1823
Line Coverage: 90.61%
Coverage Strength: 726.27 hits per line

馃挍 - Coveralls

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.

2 participants