Repository navigation
Conversation
A PUSH_PROMISE was accepted as long as its :scheme and :authority were non-empty and its :path started with "/", so promises with :authority "user@localhost" or "localhost:abc", :path "/a b" or "/a#fragment", or :scheme "1https" were returned as :push_promise responses. RFC 9113 8.4.1 has the client reset a promised stream whose request is malformed with PROTOCOL_ERROR. The :scheme is checked against the RFC 3986 3.1 scheme grammar. The :authority is parsed as RFC 3986 3.2 [ userinfo "@" ] host [ ":" port ], where the host is an IP-literal or a reg-name and the port is zero or more digits. An IP-literal is an IPvFuture or an IPv6 address, optionally followed by "%25" and an RFC 6874 zone ID made of unreserved and percent-encoded characters. The IPv6 address must be made of HEXDIG, ":" and "." characters and is then checked with :inet.parse_ipv6strict_address/1, which on its own accepts a zone ID after a bare "%" and signs in embedded IPv4 octets. RFC 9113 8.3.1 forbids userinfo for the http and https schemes, and RFC 9110 4.2.1 and 4.2.2 forbid an empty host for them, so ":443" or "@localhost" is rejected for those schemes. Both checks compare the scheme case-insensitively, and other schemes keep accepting userinfo and an empty host. An :authority that is entirely empty is rejected for every scheme, as before. The :path is checked as an RFC 9110 absolute-path with an optional query (RFC 9113 8.3.1), made of pchar, "/" and "?" characters with valid percent-encoding.
ericmj
added this pull request to stack #537
October 16, 2026 13:04
Coverage Report for CI Build 6Coverage increased (+0.1%) to 90.566%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
馃挍 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A PUSH_PROMISE was accepted as long as its
:schemeand:authoritywere non-empty and its:pathstarted with "/", so promises with:authority"user@localhost" or "localhost:abc",:path"/a b" or "/a#fragment", or:scheme"1https" were returned as:push_promiseresponses. RFC 9113 8.4.1 has the client reset a promised stream whose request is malformed with PROTOCOL_ERROR.The
:schemeis checked against the RFC 3986 3.1 scheme grammar.The
:authorityis parsed as RFC 3986 3.2 [ userinfo "@" ] host [ ":" port ], where the host is an IP-literal or a reg-name and the port is zero or more digits. An IP-literal is an IPvFuture or an IPv6 address, optionally followed by "%25" and an RFC 6874 zone ID made of unreserved and percent-encoded characters. The IPv6 address must be made of HEXDIG, ":" and "." characters and is then checked with:inet.parse_ipv6strict_address/1, which on its own accepts a zone ID after a bare "%" and signs in embedded IPv4 octets. RFC 9113 8.3.1 forbids userinfo for the http and https schemes, and RFC 9110 4.2.1 and 4.2.2 forbid an empty host for them, so ":443" or "@localhost" is rejected for those schemes. Both checks compare the scheme case-insensitively, and other schemes keep accepting userinfo and an empty host. An:authoritythat is entirely empty is rejected for every scheme, as before.The
:pathis checked as an RFC 9110 absolute-path with an optional query (RFC 9113 8.3.1), made of pchar, "/" and "?" characters with valid percent-encoding.