-
Bug
-
Resolution: Done
-
Blocker
-
None
-
None
-
None
In rfc7230 at section-3.3.2 the following passage is included:
A server MUST NOT send a Content-Length header field in any response
with a status code of 1xx (Informational) or 204 (No Content). A
server MUST NOT send a Content-Length header field in any 2xx
(Successful) response to a CONNECT request (Section 4.3.6 of
[RFC7231]).
But as shown in the following record of wireshark undertow sends a "Content-Length: 0"-header:
Transmission Control Protocol, Src Port: 28080, Dst Port: 3853, Seq: 1, Ack: 296, Len: 373
Hypertext Transfer Protocol
HTTP/1.1 101 Switching Protocols\r\n
Connection: Upgrade\r\n
Sec-WebSocket-Location: ws://<URL>\r\n
Origin: <host:port>\r\n
Upgrade: WebSocket\r\n
Content-Length: 0\r\n
Sec-WebSocket-Accept: 5dvAOheOqdbsFb3B9HYitAsUOhc=\r\n
Date: Tue, 12 Feb 2019 09:05:51 GMT\r\n
\r\n
This was a direct connection on localhost without any kind of proxy.
This problem prevents .Net-Clients from using websockets (see: https://stackoverflow.com/questions/40502921/net-websockets-forcibly-closed-despite-keep-alive-and-activity-on-the-connectio)