-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Curl does not lowercase header names for HTTP/2 and HTTP/3 #4400
Comments
Thanks @bazzadp! I think it looks perfectly reasonable so please make a PR out of it! |
putting aside the lowercase question why are the headers prefixed h3 like |
That Lines 697 to 699 in 41db01a
I would imagine we can remove that at some point as it doesn't really add much. |
It's the same with Lines 43 to 46 in 41db01a
A fact, incidentally, that caused me some confusion when I initially tried to test the HTTP/2 part of this change, as didn't realise I had to explicitly turn on Anyway, because I went with my option 3, this change also changes the non-debug lines below this (except for the
as opposed to:
So there is still value in this change, even when not in debug mode, and even when h3 changes to act more like h2. |
We should probably at least make the #ifdef CURLDEBUG
#define DEBUG_HTTP3
#endif The HTTP/2 debug is completely disabled by default pretty much because it generates so much data that is mostly uninteresting for everyone as long as you don't actually debug HTTP/2 related issues. |
Curl does not currently lower case HTTP header names as required by HTTP/2 and HTTP/3. The lower-level libraries that curl uses (nghttp for HTTP/2 and ngtcp2/quiche for HTTP/3) do lower case the header names, but it does mean for some of the output, before the lower library is invoked, curl can show upper case header names which could be confusing.
While this may seem somewhat pedantic, I still see some developers who are caught by surprised by this more strict requirement for HTTP/2 and HTTP/3 so would prefer curl to not display this as it does currently.
For example:
As I see it, we can do one of three things here:
I've taken a stab at option 3 here: master...bazzadp:lowercase_h2_h3_headernames.
I'd appreciate your thoughts on this and if it's worth submitting this as a pull request?
It's my first potential commit to curl, and my C is a little rusty, so please be kind :-)
The text was updated successfully, but these errors were encountered: