craigmcc 01/01/13 14:28:48
Modified: catalina/src/share/org/apache/catalina/connector
ResponseBase.java
Log:
ServletResponse.setBufferSize() should throw IllegalStateException if any
output has been written *or* the response has been committed. Previously, it
was only checking for the former case, so a setBufferSize() call immediately
after a flushBuffer() call would not throw the exception.
This was causing the CTS test ServletWrapperSetBufferSize_1Test to fail.
Revision Changes Path
1.10 +5 -5
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java
Index: ResponseBase.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ResponseBase.java 2001/01/04 19:49:16 1.9
+++ ResponseBase.java 2001/01/13 22:28:48 1.10
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
1.9 2001/01/04 19:49:16 remm Exp $
- * $Revision: 1.9 $
- * $Date: 2001/01/04 19:49:16 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
1.10 2001/01/13 22:28:48 craigmcc Exp $
+ * $Revision: 1.10 $
+ * $Date: 2001/01/13 22:28:48 $
*
* ====================================================================
*
@@ -88,7 +88,7 @@
* the connector-specific methods need to be implemented.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.9 $ $Date: 2001/01/04 19:49:16 $
+ * @version $Revision: 1.10 $ $Date: 2001/01/13 22:28:48 $
*/
public abstract class ResponseBase
@@ -742,7 +742,7 @@
*/
public void setBufferSize(int size) {
- if (bufferCount > 0)
+ if (committed || (bufferCount > 0))
throw new IllegalStateException
(sm.getString("responseBase.setBufferSize.ise"));
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]