ASF Bugzilla – Attachment 28132 Details for
Bug 52328
Massive garbage production observed when using the response writer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Initial ideas
bug52328.patch (text/plain), 1.63 KB, created by
Mark Thomas
on 2012-01-10 16:16:22 UTC
(
hide
)
Description:
Initial ideas
Filename:
MIME Type:
Creator:
Mark Thomas
Created:
2012-01-10 16:16:22 UTC
Size:
1.63 KB
patch
obsolete
>diff --git a/java/org/apache/catalina/connector/OutputBuffer.java b/java/org/apache/catalina/connector/OutputBuffer.java >index 4fe42b7..59c89d8 100644 >--- a/java/org/apache/catalina/connector/OutputBuffer.java >+++ b/java/org/apache/catalina/connector/OutputBuffer.java >@@ -303,6 +303,11 @@ public class OutputBuffer extends Writer > return; > } > >+ // Flush the convertor if one is in use >+ if (gotEnc && conv != null) { >+ conv.flushBuffer(); >+ } >+ > try { > doFlush = true; > if (initial) { >@@ -426,7 +431,6 @@ public class OutputBuffer extends Writer > } > > conv.convert((char) c); >- conv.flushBuffer(); > charsWritten++; > > } >@@ -454,7 +458,6 @@ public class OutputBuffer extends Writer > } > > conv.convert(c, off, len); >- conv.flushBuffer(); > charsWritten += len; > > } >@@ -476,8 +479,6 @@ public class OutputBuffer extends Writer > s = "null"; > } > conv.convert(s, off, len); >- conv.flushBuffer(); >- > } > > >@@ -493,8 +494,6 @@ public class OutputBuffer extends Writer > s = "null"; > } > conv.convert(s); >- conv.flushBuffer(); >- > } > > >@@ -579,14 +578,16 @@ public class OutputBuffer extends Writer > > > public void reset() { >- >+ // If a Writer was being used, there may be bytes in the converter >+ if (gotEnc && conv != null) { >+ conv.recycle(); >+ } > bb.recycle(); > bytesWritten = 0; > charsWritten = 0; > gotEnc = false; > enc = null; > 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 52328
: 28132