tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r530238 - in /tomcat: container/tc5.5.x/webapps/docs/changelog.xml jasper/tc5.5.x/src/share/org/apache/jasper/servlet/JspServletWrapper.java
Date Thu, 19 Apr 2007 02:27:56 GMT
Author: markt
Date: Wed Apr 18 19:27:55 2007
New Revision: 530238

URL: http://svn.apache.org/viewvc?view=rev&rev=530238
Log:
Fix bug 42071 - ISE on multiple UnavailableExceptions.
Allow recovery after an UnavailableException 

Modified:
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/servlet/JspServletWrapper.java

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=530238&r1=530237&r2=530238
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Apr 18 19:27:55 2007
@@ -139,6 +139,14 @@
         (markt)
       </fix>
       <fix>
+        <bug>42071</bug> Fix IllegalStateException on multiple requests to
+        an unavailable JSP. Patch provided by Kawasima Kazuh. (markt)
+      </fix>
+      <fix>
+        After a JSP throws an UnavailableException allow it to be accessed once
+        the unavailable period has expired. (markt)
+      </fix>
+      <fix>
         <bug>42072</bug> Don't call destroy() if the associated init() fails.
         Patch provided by Kawasima Kazuh. (markt)
       </fix>

Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/servlet/JspServletWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/servlet/JspServletWrapper.java?view=diff&rev=530238&r1=530237&r2=530238
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/servlet/JspServletWrapper.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/servlet/JspServletWrapper.java Wed Apr
18 19:27:55 2007
@@ -284,10 +284,16 @@
             }
 
             if ((available > 0L) && (available < Long.MAX_VALUE)) {
-                response.setDateHeader("Retry-After", available);
-                response.sendError
-                    (HttpServletResponse.SC_SERVICE_UNAVAILABLE,
-                     Localizer.getMessage("jsp.error.unavailable"));
+                if (available > System.currentTimeMillis()) {
+                    response.setDateHeader("Retry-After", available);
+                    response.sendError
+                        (HttpServletResponse.SC_SERVICE_UNAVAILABLE,
+                         Localizer.getMessage("jsp.error.unavailable"));
+                    return;
+                } else {
+                    // Wait period has expired. Reset.
+                    available = 0;
+                }
             }
 
             /*



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


Mime
View raw message