]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Bring the debugging output up to date with the kind of things that are
authorGarrett Rooney <rooneg@apache.org>
Sun, 5 Mar 2006 00:57:24 +0000 (00:57 +0000)
committerGarrett Rooney <rooneg@apache.org>
Sun, 5 Mar 2006 00:57:24 +0000 (00:57 +0000)
actually being debugged at the moment.  Also note a problem with the way
we handle the path info setup.

* modules/proxy/mod_proxy_fcgi.c
  (proxy_fcgi_canon): Log the filename and path info when we set them,
   add a note that the path info stuff isn't being set if we're run in
   a balancer setup, which needs to be fixed somehow.
  (send_environment): Add an (ifdefed) call to log the environment vars
   we send to the backend server.
  (dump_header_to_log): Default to ifdefing this out, we're a bit beyond
   bugs in the raw FCGI protocol at this point and it fills up the logs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@383239 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_fcgi.c

index 025cdec9db1b20802e5659b9060224c729d39a10..8f29a178784b89a5364566930c7951a05e60ace0 100644 (file)
@@ -110,8 +110,19 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
     r->filename = apr_pstrcat(r->pool, "proxy:fcgi://", host, sport, "/",
                               path, NULL);
 
+    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                  "proxy: FCGI: set r->filename to %s", r->filename);
+
+    /* XXX NOTE: this isn't ever going to be called if we're in a balancer
+     *     setup, so either we need someplace else to set this up, or the
+     *     balancer code needs to do the same thing.  As things stand you
+     *     can't depend on the PATH_INFO being sent down to the back end. */
+
     r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
 
+    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                  "proxy: FCGI: set r->path_info to %s", r->path_info);
+
     return OK;
 }
 
@@ -249,6 +260,12 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
 
         vallen = strlen(elts[i].val);
 
+#ifdef FCGI_DUMP_ENV_VARS
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                      "proxy: FCGI: sending env var '%s' value '%s'",
+                      elts[i].key, elts[i].val);
+#endif
+
         if (vallen >> 7 == 0) {
             bodylen += 1;
         }
@@ -423,6 +440,7 @@ static int handle_headers(request_rec *r,
 static void dump_header_to_log(request_rec *r, unsigned char fheader[],
                                apr_size_t length)
 {
+#ifdef FCGI_DUMP_HEADERS
     apr_size_t posn = 0;
     char asc_line[20];
     char hex_line[60];
@@ -478,6 +496,7 @@ static void dump_header_to_log(request_rec *r, unsigned char fheader[],
     }
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "HEADER: -EOH-");
+#endif
 }
 
 static apr_status_t dispatch(proxy_conn_rec *conn, request_rec *r,