Commit 984c7cc6 authored by Garrett Rooney's avatar Garrett Rooney
Browse files

Bring the debugging output up to date with the kind of things that are

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
parent 806ae1fd
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -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,