libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

h2: client: send the :authority header

Open baltitenger opened this issue 1 year ago • 1 comments

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?

baltitenger avatar Apr 04 '24 10:04 baltitenger

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.

lws-team avatar Apr 12 '24 05:04 lws-team