You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is incompatibility between compression and non-chunked encoding. writeJsonBody() adds Content-Length header (see code), but bodyWriter removes it because compression used (see code). Because of this, body writer uses ChunkedOutputStream instead CountingOutputStream, which leads to assertion at this line.
The text was updated successfully, but these errors were encountered:
japplegame
changed the title
HTTPServerResponse.writeJsonBody causes assertion
HTTPServerResponse.writeJsonBody causes assertion
Aug 22, 2014
Hmm, looks like the assertion has to go. There was actually an issue there (one of the output ranges missing a put(char) overload caused too many bytes to be written), so that's a bit unfortunate, but the only other way would be to install another counting wrapper stream and I'm not sure if adding more overhead just for an assertion is a good idea.
HTTPServerResponse.writeJsonBody
causes assertion if compression used.Test-case:
The reason is incompatibility between compression and non-chunked encoding.
writeJsonBody()
addsContent-Length
header (see code), butbodyWriter
removes it because compression used (see code). Because of this, body writer usesChunkedOutputStream
insteadCountingOutputStream
, which leads to assertion at this line.The text was updated successfully, but these errors were encountered: