ASF Bugzilla – Attachment 21685 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 tomcat5.5
tomcat5.5_connector.patch (text/plain), 2.61 KB, created by
Suzuki Yuichiro
on 2008-03-19 05:13:54 UTC
(
hide
)
Description:
patch for tomcat5.5
Filename:
MIME Type:
Creator:
Suzuki Yuichiro
Created:
2008-03-19 05:13:54 UTC
Size:
2.61 KB
patch
obsolete
>Index: util/java/org/apache/tomcat/util/buf/B2CConverter.java >=================================================================== >--- util/java/org/apache/tomcat/util/buf/B2CConverter.java (revision 638800) >+++ util/java/org/apache/tomcat/util/buf/B2CConverter.java (working copy) >@@ -68,11 +68,12 @@ > char result[]=new char[BUFFER_SIZE]; > > /** Convert a buffer of bytes into a chars >+ * @deprecated > */ > public void convert( ByteChunk bb, CharChunk cb ) > throws IOException > { >- convert(bb, cb, cb.getBuffer().length - cb.getEnd()); >+ convert(bb, cb, cb.getLimit() - cb.getEnd()); > } > > /** Convert a buffer of bytes into a chars >@@ -90,7 +91,6 @@ > { > try { > // read from the reader >- int count = 0; > while( limit > 0 ) { > int size = limit < BUFFER_SIZE ? limit : BUFFER_SIZE; > int cnt=conv.read( result, 0, size ); >@@ -195,14 +195,15 @@ > */ > final class ReadConvertor extends InputStreamReader { > >- // Has a private, internal byte[8192] >- >+ private IntermediateInputStream iis; >+ > /** Create a converter. > */ > public ReadConvertor( IntermediateInputStream in, String enc ) > throws UnsupportedEncodingException > { > super( in, enc ); >+ iis=in; > } > > /** Overriden - will do nothing but reset internal state. >@@ -219,9 +220,18 @@ > return super.read( cbuf, off, len ); > } > >- /** Reset the buffer >+ /* >+ * Reset the buffer > */ > public final void recycle() { >+ iis.recycle(); >+ try{ >+ // Must clear super's buffer. >+ while(ready()){ >+ // InputStreamReader#skip(long) will allocate buffer to skip. >+ read(); >+ } >+ }catch(IOException ioe){} > } > } > >@@ -244,21 +254,32 @@ > } > > public final int read(byte cbuf[], int off, int len) throws IOException { >- int nread = bc.substract(cbuf, off, len); >- return nread; >+ if(bc == null){ >+ return -1; >+ } >+ return bc.substract(cbuf, off, len); > } > > public final int read() throws IOException { >+ if(bc == null){ >+ return -1; >+ } > return bc.substract(); > } > > public int available() throws IOException { >+ if(bc == null){ >+ return 0; >+ } > return bc.getLength(); > } > > > // -------------------- Internal methods -------------------- > >+ void recycle(){ >+ bc = null; >+ } > > void setByteChunk( ByteChunk mb ) { > bc = mb;
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