tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1413553 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/http/HttpServletResponse.java webapps/docs/changelog.xml
Date Mon, 26 Nov 2012 11:12:13 GMT
Author: markt
Date: Mon Nov 26 11:12:12 2012
New Revision: 1413553

URL: http://svn.apache.org/viewvc?rev=1413553&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54198
Clarify that sendError(int) results in an HTML response.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1413552

Modified: tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java?rev=1413553&r1=1413552&r2=1413553&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java (original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java Mon Nov 26 11:12:12
2012
@@ -116,13 +116,13 @@ public interface HttpServletResponse ext
     public String encodeRedirectUrl(String url);
 
     /**
-     * Sends an error response to the client using the specified status. The
-     * server defaults to creating the response to look like an HTML-formatted
-     * server error page containing the specified message, setting the content
-     * type to "text/html", leaving cookies and other headers unmodified. If an
-     * error-page declaration has been made for the web application
-     * corresponding to the status code passed in, it will be served back in
-     * preference to the suggested msg parameter.
+     * Sends an error response to the client using the specified status code and
+     * clears the output buffer. The server defaults to creating the response to
+     * look like an HTML-formatted server error page containing the specified
+     * message, setting the content type to "text/html", leaving cookies and
+     * other headers unmodified. If an error-page declaration has been made for
+     * the web application corresponding to the status code passed in, it will
+     * be served back in preference to the suggested msg parameter.
      * <p>
      * If the response has already been committed, this method throws an
      * IllegalStateException. After using this method, the response should be
@@ -141,11 +141,8 @@ public interface HttpServletResponse ext
 
     /**
      * Sends an error response to the client using the specified status code and
-     * clearing the buffer.
-     * <p>
-     * If the response has already been committed, this method throws an
-     * IllegalStateException. After using this method, the response should be
-     * considered to be committed and should not be written to.
+     * clears the buffer. This is equivalent to calling {@link #sendError(int,
+     * String)} with the same status code and <code>null</code> for the message.
      * 
      * @param sc
      *            the error status code

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1413553&r1=1413552&r2=1413553&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Nov 26 11:12:12 2012
@@ -66,6 +66,15 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Web applications">
+    <changelog>
+      <fix>
+        <bug>54198</bug>: Clarify that
+        <code>HttpServletResponse.sendError(int)</code> results in an HTML
+        response by default. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Other">
     <changelog>
       <update>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message