-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
Undertow write-timeout can cause closing a connection for a long-polling request without sending the last zero-length chunk like 0\r\n\r\n. This behavior causes a browser-side error, e.g. net::ERR_INCOMPLETE_CHUNKED_ENCODING in Google Chrome.
In current Undertow implementation of write-timeout, for requests that re-use a keep-alive connection, the write-timeout set during the previous request processing is taken over to the next request. As a result, a zero chunk truncated response is returned if meet the following conditions are true:
- The request re-use a keep-alive connection.
- The request takes longer than write-timeout like long-polling processing by AsyncServlet.
- Transfer-Encoding: chunked is applied to the response by calling flush() in the servlet.
Even if the write-timeout is reached, it is expected to write the last chunk to the socket before closing a connection.
- clones
-
JBEAP-23722 [GSS](7.4.z) UNDERTOW-2241 Undertow write-timeout can cause missing the last zero-length chunk in long polling
- Closed
- is blocked by
-
UNDERTOW-2247 Add support to recursive writes at HttpResponseConduit
- Closed
- is incorporated by
-
WFCORE-6388 Upgrade Undertow to 2.3.7.Final
- Closed
- is related to
-
UNDERTOW-2248 WriteTimeoutStreamSinkConduit should clear the expireTime on timeout
- Closed