httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1708095 - /httpd/httpd/trunk/server/request.c
Date Mon, 12 Oct 2015 11:57:42 GMT
Author: ylavic
Date: Mon Oct 12 11:57:42 2015
New Revision: 1708095

URL: http://svn.apache.org/viewvc?rev=1708095&view=rev
Log:
core: follow up to r1708084.
We don't want to process the subrequest either in ap_sub_req_method_uri()
if the quick-handler returned an error (or any final status).

Modified:
    httpd/httpd/trunk/server/request.c

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=1708095&r1=1708094&r2=1708095&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Mon Oct 12 11:57:42 2015
@@ -2228,8 +2228,7 @@ AP_DECLARE(request_rec *) ap_sub_req_met
                                                 ap_filter_t *next_filter)
 {
     request_rec *rnew;
-    /* Initialise res, to avoid a gcc warning */
-    int res = HTTP_INTERNAL_SERVER_ERROR;
+    int res = DECLINED;
     char *udir;
 
     rnew = make_sub_request(r, next_filter);
@@ -2246,6 +2245,9 @@ AP_DECLARE(request_rec *) ap_sub_req_met
         udir = ap_escape_uri(rnew->pool, udir);    /* re-escape it */
         ap_parse_uri(rnew, ap_make_full_path(rnew->pool, udir, new_uri));
     }
+    if (ap_is_HTTP_ERROR(rnew->status)) {
+        return rnew;
+    }
 
     /* We cannot return NULL without violating the API. So just turn this
      * subrequest into a 500 to indicate the failure. */
@@ -2267,11 +2269,11 @@ AP_DECLARE(request_rec *) ap_sub_req_met
     if (next_filter) {
         res = ap_run_quick_handler(rnew, 1);
     }
-
-    if (next_filter == NULL || res != OK) {
-        if ((res = ap_process_request_internal(rnew))) {
-            rnew->status = res;
-        }
+    if (res == DECLINED) {
+        res = ap_process_request_internal(rnew);
+    }
+    if (res) {
+        rnew->status = res;
     }
 
     return rnew;



Mime
View raw message