httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chr...@apache.org
Subject svn commit: r1357986 - /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c
Date Thu, 05 Jul 2012 23:01:10 GMT
Author: chrisd
Date: Thu Jul  5 23:01:09 2012
New Revision: 1357986

URL: http://svn.apache.org/viewvc?rev=1357986&view=rev
Log:
Avoid internal sub-requests and processing of Location headers when
in FCGI_AUTHORIZER mode, as the mod_fcgid_authenticator(), etc. hook
functions report an error if the script returned a Location header and
redirections are nonsensical in this mode.

Previously, the handle_request_ipc() and handle_request() functions would
examine this header when in FCGI_AUTHORIZER mode and then possibly execute
an internal sub-request, which has no particular use, as its return value
is ignored and its output may conflict with that of the actual content
generation phase.

Modified:
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c?rev=1357986&r1=1357985&r2=1357986&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c Thu Jul  5 23:01:09 2012
@@ -320,6 +320,10 @@ handle_request_ipc(request_rec *r, int r
         return cond_status;
     }
 
+    if (role == FCGI_AUTHORIZER) {
+        return cond_status;
+    }
+
     /* Check redirect */
     location = apr_table_get(r->headers_out, "Location");
 
@@ -347,9 +351,8 @@ handle_request_ipc(request_rec *r, int r
     }
 
     /* Now pass to output filter */
-    if (role == FCGI_RESPONDER
-        && (rv = ap_pass_brigade(r->output_filters,
-                                 brigade_stdout)) != APR_SUCCESS) {
+    if ((rv = ap_pass_brigade(r->output_filters,
+                              brigade_stdout)) != APR_SUCCESS) {
         if (!APR_STATUS_IS_ECONNABORTED(rv)) {
             ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
                           "mod_fcgid: ap_pass_brigade failed in "



Mime
View raw message