-
Bug
-
Resolution: Done
-
Major
-
1.0.2.Final
-
None
-
None
When testing a SockJS server implementation on top of Undertow, I ran across an issue in their test suite of the "xhr_streaming" protocol where Undertow is sending the chunks of a chunked response without the trailing CRLF of each chunk. Instead, that trailing CRLF is being sent as a prefix to the subsequent chunk.
This breaks the expectations of the SockJS client and probably other clients that rely on streaming chunks over HTTP. This also appears to violate the HTTP spec at http://tools.ietf.org/html/rfc2616#section-3.6.1 where it explicitly states that a chunk is comprised of:
chunk = chunk-size [ chunk-extension ] CRLF chunk-data CRLF
The final CRLF in that chunk is what's being left off until the next chunk of data is sent. It instead should be sent with the current chunk.