Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

http2: accept requests without :authority pseudo-header? #11765

Open
vuori opened this issue Sep 12, 2024 · 1 comment
Open

http2: accept requests without :authority pseudo-header? #11765

vuori opened this issue Sep 12, 2024 · 1 comment
Labels

Comments

@vuori
Copy link

vuori commented Sep 12, 2024

As of 10.0.0, ATS http2 request parser rejects requests without the :authority pseudo-header. However, haproxy's http2 client will in many situations send requests that have the Host header but no :authority. There is an issue open about this on haproxy side: haproxy/haproxy#2592. The underlying standardization issue seems to be different wording regarding conversion of a Host header into an :authority header in RFC 7540 vs. 9113, where haproxy hews to 7540 re: preserving http/1.1 semantics as far as possible when converting requests between protocols.

The haproxy issue is originally about Jetty, which apparently ended up adding support for Host as an alternative to :authority. What's the ATS view on this? Would it be reasonable to accept Host in lieu of :authority if the latter is missing?

@maskit
Copy link
Member

maskit commented Sep 12, 2024

This is just my personal view, not the ATS view or the community view.

My short answer is no.

Putting how ATS currently behaves aside, the RFC sounds like the lack of :authority pseudo-header does not necessarily invalidate a request. With that said, I can't think of a case that an intermediary cannot construct :authority pseudo-header where it can send Host header. I'd say such a request is malformed.

However, if there are HTTP/2 implementations behaving like that and there are ATS users willing to accept such requests, I don't mind having a setting to allow using Host instead of :authority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants