View | Details | Raw Unified | Return to bug 46770
Collapse All | Expand All

(-)container/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java (-1 / +5 lines)
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 312-320 Link Here
312
            state = BYTE_STATE;
314
            state = BYTE_STATE;
313
        } else if (state == BYTE_STATE) {
315
        } else if (state == BYTE_STATE) {
314
            bb.flushBuffer();
316
            bb.flushBuffer();
315
        } else if (state == INITIAL_STATE) {
317
        } else if (state == INITIAL_STATE && initial) {
316
            // If the buffers are empty, commit the response header
318
            // If the buffers are empty, commit the response header
317
            coyoteResponse.sendHeaders();
319
            coyoteResponse.sendHeaders();
320
            initial = false;
318
        }
321
        }
319
        doFlush = false;
322
        doFlush = false;
320
323
Lines 650-655 Link Here
650
        gotEnc = false;
653
        gotEnc = false;
651
        enc = null;
654
        enc = null;
652
        state = INITIAL_STATE;
655
        state = INITIAL_STATE;
656
        initial = true;
653
    }
657
    }
654
658
655
659

Return to bug 46770