Skip to content

Reject request header blocks with neither :authority nor Host headers. #245

Closed

Description

@Lukasa

RFC 7540 Section 8.1.2.3 has complex rules regarding :authority and Host headers, but the basic gist of it is that there is very nearly no situation when you can have neither of them. Basically the only way this could happen is if a HTTP/1.0 request with no Host header was proxied into a HTTP/2 request. I'm pretty disinterested in serving this use-case at this time, so I think we should forbid both sending and receiving header blocks of this form.

Activity

  1. Lukasa commented on Jun 29, 2016

    @Lukasa
    MemberAuthor

    For @python-hyper/contributors, if you want to tackle this, you'll want to write another stage in the validate_headers header filter pipeline defined in utilities.py. That'll work for received headers. Sending headers have a much smaller filter pipeline, but at this point we should probably define a validate_sent_headers header filter pipeline that takes the two current stages of the sent pipeline (_lowercase_header_names and secure_headers) and adds some more.

    This is a pretty good easy-to-intermediate task: it's a real problem that requires you to write real code, but it's pretty self-contained and easy enough to understand. If someone wants to work on it, assign it to yourself. Feel free to ask me to sketch out my proposed design in more detail.

  2. self-assigned this
    on Jul 8, 2016
  3. alexwlchan commented on Jul 8, 2016

    @alexwlchan
    Contributor

    I'm going to have a look at this today.

  4. Lukasa commented on Jul 8, 2016

    @Lukasa
    MemberAuthor

    \o/ Sounds good @alexwlchan, hit me up if you have questions!

  5. Lukasa commented on Jul 20, 2016

    @Lukasa
    MemberAuthor

    This is partly resolved by #252. We now only need to reject sending such blocks.

  6. Lukasa commented on Aug 11, 2016

    @Lukasa
    MemberAuthor

    Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions