NGINX stripping websocket "Upgrade" headers

bengalih nginx-forum at forum.nginx.org
Tue Jan 14 06:20:41 UTC 2020


Figured it out!

https://www.reddit.com/r/nginx/comments/eodrjc/nginx_stripping_websocket_upgrade_headers/

fireye quote:
----------------------------------------
Got it figured out, this is a quirk of HTTP/2.0 vs 1.1. Per RFC-2616:

The Upgrade header field is intended to provide a simple mechanism for
transition from HTTP/1.1 to some other, incompatible protocol.

It looks like nginx discards the Upgrade header, when presented by a client,
if the client communicates via HTTP2.0 already. You can confirm this by
using the --http1.1 flag with curl and looking at the headers being
transferred.
-----------------------------------------

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286719,286721#msg-286721



More information about the nginx mailing list