Patch for bug 43683. It could be more efficient if wrapper.started was visible but...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 17 Apr 2008 22:07:38 +0000 (22:07 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 17 Apr 2008 22:07:38 +0000 (22:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@649302 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardContextValve.java

index c473590..0b9b100 100644 (file)
@@ -136,6 +136,13 @@ final class StandardContextValve
 
         // Select the Wrapper to be used for this Request
         Wrapper wrapper = request.getWrapper();
+
+        if (wrapper.isUnavailable()) {
+            // May be as a result of a reload
+            // Try and find the new wrapper
+            wrapper = (Wrapper) container.findChild(wrapper.getName());
+        }
+
         if (wrapper == null) {
             String requestURI = request.getDecodedRequestURI();
             notFound(requestURI, response);