ASF Bugzilla – Attachment 21832 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 that make readAheadLimit value effective
6.0.x_trunk_readAheadLimit.patch (text/plain), 2.37 KB, created by
Suzuki Yuichiro
on 2008-04-18 21:51:32 UTC
(
hide
)
Description:
patch that make readAheadLimit value effective
Filename:
MIME Type:
Creator:
Suzuki Yuichiro
Created:
2008-04-18 21:51:32 UTC
Size:
2.37 KB
patch
obsolete
>Index: java/org/apache/catalina/connector/InputBuffer.java >=================================================================== >--- java/org/apache/catalina/connector/InputBuffer.java (revision 649726) >+++ java/org/apache/catalina/connector/InputBuffer.java (working copy) >@@ -150,8 +150,14 @@ > * Buffer size. > */ > private int size = -1; >+ >+ >+ /** >+ * readAheadLimit for mark and reset. >+ */ >+ private int readAheadLimit = -1; >+ > >- > // ----------------------------------------------------------- Constructors > > >@@ -363,6 +369,12 @@ > } > } > >+ if (markPos >= 0){ >+ if (cb.getOffset() - markPos > readAheadLimit){ >+ markPos = -1; >+ } >+ } >+ > if (markPos == -1) { > cb.setOffset(0); > cb.setEnd(0); >@@ -466,6 +478,10 @@ > if (closed) > throw new IOException(sm.getString("inputBuffer.streamClosed")); > >+ if (readAheadLimit < 0){ >+ throw new IllegalArgumentException(sm.getString("inputBuffer.readAheadLimitNegative")); >+ } >+ > if (cb.getLength() <= 0) { > cb.setOffset(0); > cb.setEnd(0); >@@ -480,6 +496,7 @@ > } > cb.setLimit(cb.getStart() + readAheadLimit + size); > markPos = cb.getStart(); >+ this.readAheadLimit = readAheadLimit; > } > > >@@ -491,9 +508,7 @@ > > if (state == CHAR_STATE) { > if (markPos < 0) { >- cb.recycle(); >- markPos = -1; >- throw new IOException(); >+ throw new IOException(sm.getString("inputBuffer.markNotEffective")); > } else { > cb.setOffset(markPos); > } >Index: java/org/apache/catalina/connector/LocalStrings.properties >=================================================================== >--- java/org/apache/catalina/connector/LocalStrings.properties (revision 649726) >+++ java/org/apache/catalina/connector/LocalStrings.properties (working copy) >@@ -76,4 +76,6 @@ > mapperListener.unregisterContext=Unregister Context {0} > mapperListener.registerWrapper=Register Wrapper {0} in Context {1} > >-inputBuffer.streamClosed=Stream closed >\ No newline at end of file >+inputBuffer.streamClosed=Stream closed >+inputBuffer.readAheadLimitNegative=readAheadLimit value is negative >+inputBuffer.markNotEffective=The mark is not effective
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