Skip to content

allow servers to receive requests without an :authority header #372

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

seanmonstar
Copy link
Member

The code before tried to allow these requests, but then the request::Builder would error trying to construct a Uri with only the scheme and path. Now, if there is no authority, the scheme is dropped.

Closes #345

Copy link
Collaborator

@olix0r olix0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!


// A request translated from HTTP/1 must not include the :authority
// header
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a host header is present do we have any obligation to validate it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find anything in the HTTP2 spec stating to do anything with a received host header besides handling it like any other.

@seanmonstar seanmonstar merged commit 383593a into master Jun 17, 2019
@seanmonstar seanmonstar deleted the server-receive-request-without-authority branch June 17, 2019 19:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requests missing an :authority pseudo-header return PROTOCOL_ERROR
2 participants