ASF Bugzilla – Attachment 23316 Details for
Bug 46770
Headers are send duplicate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch using a guard to prevent duplicate headers flushing in OutputBuffer
bz46770-20090226b.patch (text/plain), 1.42 KB, created by
Rainer Jung
on 2009-02-26 08:37:14 UTC
(
hide
)
Description:
Patch using a guard to prevent duplicate headers flushing in OutputBuffer
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2009-02-26 08:37:14 UTC
Size:
1.42 KB
patch
obsolete
>Index: container/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java >=================================================================== >--- container/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java (revision 747981) >+++ container/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java (working copy) >@@ -79,6 +79,7 @@ > * State of the output buffer. > */ > private int state = 0; >+ private boolean initial = true; > > > /** >@@ -229,6 +230,7 @@ > public void recycle() { > > state = INITIAL_STATE; >+ initial = true; > bytesWritten = 0; > charsWritten = 0; > >@@ -306,15 +308,17 @@ > return; > > doFlush = true; >+ if (initial) { >+ // If the buffers are empty, commit the response header >+ coyoteResponse.sendHeaders(); >+ initial = false; >+ } > if (state == CHAR_STATE) { > cb.flushBuffer(); > bb.flushBuffer(); > state = BYTE_STATE; > } else if (state == BYTE_STATE) { > bb.flushBuffer(); >- } else if (state == INITIAL_STATE) { >- // If the buffers are empty, commit the response header >- coyoteResponse.sendHeaders(); > } > doFlush = false; > >@@ -650,6 +654,7 @@ > gotEnc = false; > enc = null; > state = INITIAL_STATE; >+ initial = true; > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46770
:
23308
|
23309
|
23310
|
23311
|
23314
| 23316