libwebsockets
libwebsockets copied to clipboard
h2: client: send the :authority header
According to rfc7540 the :authority pseudo-header field should be used instead of the Host header field. I need this change because I want to interact with a server that rejects requests sent by the current version of libwebsockets since it only sends the Host header. Note that in case of HTTP/2, libcurl only sends :authority, as recommended by the rfc. I see that libwebsockets also used to do this but that part of the code has been changed in lib/roles/http2.c. Is this change still required / intentional?
Honestly I don't remember. git blame says it was done while handling h2 redirects using the same client wsi, I assume it made trouble there, perhaps due to the authority needing changing then?
If you want to resurrect it with something that works, I'll be happy to look at a patch.