Skip to content

Incorrect Enforcement of HTTP/2 Pseudo Headers for CONNECT Requests #252

Closed

Description

@bneradt

The HTTP/2 RFC specifies a required set of pseudo header fields for both requests (:method, :scheme, and :path) and responses (:status). It does, however, make an exception for HTTP/2 CONNECT requests:

https://www.rfc-editor.org/rfc/rfc9113#section-8.3.1-3

All HTTP/2 requests MUST include exactly one valid value for the ":method", ":scheme", and ":path" pseudo-header fields, unless they are CONNECT requests (Section 8.5). An HTTP request that omits mandatory pseudo-header fields is malformed (Section 8.1.1).

And, in the section describing HTTP/2 and CONNECT:

https://www.rfc-editor.org/rfc/rfc9113#name-the-connect-method

The ":scheme" and ":path" pseudo-header fields MUST be omitted.

The pseudo header method enforcement mechanism in Proxy Verifier should be reviewed and corrected where necessary, both for CONNECT and other methods. Currently Proxy Verifier blocks RFC compliant CONNECT requests, so that clearly needs to be updated. I suppose for non-CONNECT requests, it shouldn't strictly require :authority either. So that should be updated too.

Activity

  1. added
    bug
    on May 1, 2023
  2. bneradt commented on May 1, 2023

    @bneradt
    CollaboratorAuthor

    Marking this as a bug since it's against the spec to require :scheme and :path for HTTP/2 connect requests.

  3. changed the title [-]HTTP/2: Support CONNECT Requests[/-] [+]Incorrect Enforcement of HTTP/2 Pseudo Headers for CONNECT Requests[/+] on May 1, 2023
  4. added a commit that references this issue on Jun 6, 2023
    cc61d12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions