Issue #5214 - Use known content_length when in bypass write
+ In the case of HEAD, the servlet-api response is a wrapper of javax.servlet.http.HttpServlet$NoBodyResponse We know the content_length, use it. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
116871362b
commit
eba360f662
|
@ -677,7 +677,7 @@ public class ResourceService
|
|||
else if (written || !(out instanceof HttpOutput))
|
||||
{
|
||||
// write normally
|
||||
putHeaders(response, content, written ? -1 : 0);
|
||||
putHeaders(response, content, content_length);
|
||||
ByteBuffer buffer = content.getIndirectBuffer();
|
||||
if (buffer != null)
|
||||
BufferUtil.writeTo(buffer, out);
|
||||
|
|
Loading…
Reference in New Issue