You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/05/29 16:34:37 UTC
svn commit: r1598304 - /tomcat/trunk/java/org/apache/coyote/Response.java
Author: markt
Date: Thu May 29 14:34:37 2014
New Revision: 1598304
URL: http://svn.apache.org/r1598304
Log:
Check committed before changing any field values
Remove various incorrect comments
Modified:
tomcat/trunk/java/org/apache/coyote/Response.java
Modified: tomcat/trunk/java/org/apache/coyote/Response.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1598304&r1=1598303&r2=1598304&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Response.java Thu May 29 14:34:37 2014
@@ -265,8 +265,10 @@ public final class Response {
public void reset() throws IllegalStateException {
- // Reset the headers only if this is the main request,
- // not for included
+ if (commited) {
+ throw new IllegalStateException();
+ }
+
contentType = null;
locale = DEFAULT_LOCALE;
contentLanguage = null;
@@ -278,15 +280,7 @@ public final class Response {
message = null;
headers.clear();
- // Force the PrintWriter to flush its data to the output
- // stream before resetting the output stream
- //
// Reset the stream
- if (commited) {
- //String msg = sm.getString("servletOutputStreamImpl.reset.ise");
- throw new IllegalStateException();
- }
-
action(ActionCode.RESET, this);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org