ASF Bugzilla – Attachment 21686 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_container.patch (text/plain), 3.26 KB, created by
Suzuki Yuichiro
on 2008-03-19 05:15:26 UTC
(
hide
)
Description:
patch for tomcat5.5
Filename:
MIME Type:
Creator:
Suzuki Yuichiro
Created:
2008-03-19 05:15:26 UTC
Size:
3.26 KB
patch
obsolete
>Index: catalina/src/share/org/apache/catalina/connector/CoyoteReader.java >=================================================================== >--- catalina/src/share/org/apache/catalina/connector/CoyoteReader.java (revision 638800) >+++ catalina/src/share/org/apache/catalina/connector/CoyoteReader.java (working copy) >@@ -119,7 +119,7 @@ > > > public boolean markSupported() { >- return true; >+ return ib.markSupported(); > } > > >Index: catalina/src/share/org/apache/catalina/connector/InputBuffer.java >=================================================================== >--- catalina/src/share/org/apache/catalina/connector/InputBuffer.java (revision 638800) >+++ catalina/src/share/org/apache/catalina/connector/InputBuffer.java (working copy) >@@ -227,15 +227,14 @@ > } > > >- public int available() >- throws IOException { >+ public int available() { >+ int available = 0; > if (state == BYTE_STATE) { >- return bb.getLength(); >+ available = bb.getLength(); > } else if (state == CHAR_STATE) { >- return cb.getLength(); >- } else { >- return 0; >+ available = cb.getLength(); > } >+ return available; > } > > >@@ -308,21 +307,29 @@ > if (!gotEnc) > setConverter(); > >+ int nRead = 0; > if (bb.getLength() <= 0) { >- int nRead = realReadBytes(bb.getBytes(), 0, bb.getBytes().length); >- if (nRead < 0) { >- return -1; >- } >+ nRead = realReadBytes(bb.getBytes(), 0, bb.getBytes().length); >+ // Data may be remaining in the buffer of ReadConverter('s super). >+ // So we must try to convert whether nRead is positive or not. > } >- > if (markPos == -1) { > cb.setOffset(0); > cb.setEnd(0); > } >+ >+ if((markPos >= 0) && (cb.getLimit()-cb.getEnd()) <= 0){ >+ // markPos will be reset and the status of cb will be modified >+ // via cb.flushBuffer(), only if more chars exists. >+ conv.convert(bb, cb, cb.getLimit()); >+ }else{ >+ conv.convert(bb, cb, cb.getLimit()-cb.getEnd()); >+ } > state = CHAR_STATE; >- conv.convert(bb, cb, len); >- bb.setOffset(bb.getEnd()); > >+ if((nRead < 0) && (cb.getLength()==0)){ >+ return -1; >+ } > return cb.getLength(); > > } >@@ -380,7 +387,7 @@ > > public boolean ready() > throws IOException { >- return (cb.getLength() > 0); >+ return (available() > 0); > } > > >@@ -391,6 +398,9 @@ > > public void mark(int readAheadLimit) > throws IOException { >+ if (readAheadLimit < 0){ // See BufferedReader#mark(int) JavaDoc >+ throw new IllegalArgumentException("readAheadLimit value is negative"); >+ } > if (cb.getLength() <= 0) { > cb.setOffset(0); > cb.setEnd(0); >@@ -416,9 +426,7 @@ > throws IOException { > if (state == CHAR_STATE) { > if (markPos < 0) { >- cb.recycle(); >- markPos = -1; >- throw new IOException(); >+ throw new IOException("The mark is not effective"); > } else { > cb.setOffset(markPos); > }
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