ASF Bugzilla – Attachment 21872 Details for
Bug 44494
Requests greater than 8k being truncated.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for TC 5.5 Part 1 - connectors (CharChunk, B2CConverter)
bz44494-tc55-connectors.patch (text/plain), 2.14 KB, created by
Rainer Jung
on 2008-04-28 11:47:29 UTC
(
hide
)
Description:
Patch for TC 5.5 Part 1 - connectors (CharChunk, B2CConverter)
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2008-04-28 11:47:29 UTC
Size:
2.14 KB
patch
obsolete
>Index: connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java >=================================================================== >--- connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java (Revision 648322) >+++ connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java (Arbeitskopie) >@@ -478,7 +478,7 @@ > tmp=new char[newSize]; > } > >- System.arraycopy(buff, start, tmp, start, end-start); >+ System.arraycopy(buff, 0, tmp, 0, end); > buff = tmp; > tmp = null; > } >Index: connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java >=================================================================== >--- connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java (Revision 648322) >+++ connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java (Arbeitskopie) >@@ -82,17 +82,12 @@ > { > // Set the ByteChunk as input to the Intermediate reader > iis.setByteChunk( bb ); >- convert(cb, limit); >- } >- >- private void convert(CharChunk cb, int limit) >- throws IOException >- { > try { > // read from the reader >- int count = 0; >+ int bbLengthBeforeRead = 0; > while( limit > 0 ) { > int size = limit < BUFFER_SIZE ? limit : BUFFER_SIZE; >+ bbLengthBeforeRead = bb.getLength(); > int cnt=conv.read( result, 0, size ); > if( cnt <= 0 ) { > // End of stream ! - we may be in a bad state >@@ -106,7 +101,7 @@ > > // XXX go directly > cb.append( result, 0, cnt ); >- limit -= cnt; >+ limit = limit - (bbLengthBeforeRead - bb.getLength()); > } > } catch( IOException ex) { > if( debug>0) >@@ -222,6 +217,14 @@ > /** Reset the buffer > */ > public final void recycle() { >+ try { >+ // Must clear super's buffer. >+ while (ready()) { >+ // InputStreamReader#skip(long) will allocate buffer to skip. >+ read(); >+ } >+ } catch(IOException ioe){ >+ } > } > } >
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 44494
:
21683
|
21684
|
21685
|
21686
|
21700
|
21705
|
21717
|
21832
| 21872 |
21873