Lines 79-84
Link Here
|
79 |
* State of the output buffer. |
79 |
* State of the output buffer. |
80 |
*/ |
80 |
*/ |
81 |
private int state = 0; |
81 |
private int state = 0; |
|
|
82 |
private boolean initial = true; |
82 |
|
83 |
|
83 |
|
84 |
|
84 |
/** |
85 |
/** |
Lines 229-234
Link Here
|
229 |
public void recycle() { |
230 |
public void recycle() { |
230 |
|
231 |
|
231 |
state = INITIAL_STATE; |
232 |
state = INITIAL_STATE; |
|
|
233 |
initial = true; |
232 |
bytesWritten = 0; |
234 |
bytesWritten = 0; |
233 |
charsWritten = 0; |
235 |
charsWritten = 0; |
234 |
|
236 |
|
Lines 306-320
Link Here
|
306 |
return; |
308 |
return; |
307 |
|
309 |
|
308 |
doFlush = true; |
310 |
doFlush = true; |
|
|
311 |
if (initial) { |
312 |
// If the buffers are empty, commit the response header |
313 |
coyoteResponse.sendHeaders(); |
314 |
initial = false; |
315 |
} |
309 |
if (state == CHAR_STATE) { |
316 |
if (state == CHAR_STATE) { |
310 |
cb.flushBuffer(); |
317 |
cb.flushBuffer(); |
311 |
bb.flushBuffer(); |
318 |
bb.flushBuffer(); |
312 |
state = BYTE_STATE; |
319 |
state = BYTE_STATE; |
313 |
} else if (state == BYTE_STATE) { |
320 |
} else if (state == BYTE_STATE) { |
314 |
bb.flushBuffer(); |
321 |
bb.flushBuffer(); |
315 |
} else if (state == INITIAL_STATE) { |
|
|
316 |
// If the buffers are empty, commit the response header |
317 |
coyoteResponse.sendHeaders(); |
318 |
} |
322 |
} |
319 |
doFlush = false; |
323 |
doFlush = false; |
320 |
|
324 |
|
Lines 650-655
Link Here
|
650 |
gotEnc = false; |
654 |
gotEnc = false; |
651 |
enc = null; |
655 |
enc = null; |
652 |
state = INITIAL_STATE; |
656 |
state = INITIAL_STATE; |
|
|
657 |
initial = true; |
653 |
} |
658 |
} |
654 |
|
659 |
|
655 |
|
660 |
|