Closed hhgyu closed 4 years ago
When testing websocket support, I found that the Upgrade header value is treated as case sensitive.
https://github.com/paullouisageneau/libdatachannel/blob/5482912e18f64f67863a8769de6056787158c758/src/wstransport.cpp#L217-L231
https://github.com/warmcat/libwebsockets/blob/main/lib/roles/ws/server-ws.c#L689
LWS_CPYAPP(p, "HTTP/1.1 101 Switching Protocols\x0d\x0a" "Upgrade: WebSocket\x0d\x0a" "Connection: Upgrade\x0d\x0a" "Sec-WebSocket-Accept: ");
RFC6455 always uses websocket as value, but Section 11.2 registers WebSocket as Upgrade keyword.
Indeed, thanks for testing! This is fixed by https://github.com/paullouisageneau/libdatachannel/pull/277
When testing websocket support, I found that the Upgrade header value is treated as case sensitive.
https://github.com/paullouisageneau/libdatachannel/blob/5482912e18f64f67863a8769de6056787158c758/src/wstransport.cpp#L217-L231
https://github.com/warmcat/libwebsockets/blob/main/lib/roles/ws/server-ws.c#L689
RFC6455 always uses websocket as value, but Section 11.2 registers WebSocket as Upgrade keyword.