You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2010/04/23 19:19:53 UTC

Re: svn commit: r937378 - in /httpd/mod_fcgid/trunk: CHANGES-FCGID docs/manual/mod/mod_fcgid.xml modules/fcgid/mod_fcgid.c

On Fri, Apr 23, 2010 at 1:04 PM,  <tr...@apache.org> wrote:
> Author: trawick
> Date: Fri Apr 23 17:04:40 2010
> New Revision: 937378
>
> URL: http://svn.apache.org/viewvc?rev=937378&view=rev
> Log:
> FcgidPassHeader now maps header names to environment variable names
> in the usual manner: The header name is converted to upper case and
> is prefixed with HTTP_.  An additional environment variable is
> created with the legacy name.

> Modified: httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c
> URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c?rev=937378&r1=937377&r2=937378&view=diff
> ==============================================================================
> --- httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c (original)
> +++ httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c Fri Apr 23 17:04:40 2010
> @@ -19,6 +19,7 @@
>  #include "http_request.h"
>  #include "http_protocol.h"
>  #include "ap_mmn.h"
> +#include "apr_lib.h"
>  #include "apr_buckets.h"
>  #include "apr_strings.h"
>  #include "apr_thread_proc.h"
> @@ -105,6 +106,32 @@ default_build_command(const char **cmd,
>     return APR_SUCCESS;
>  }
>
> +/* http2env stolen from util_script.c */
> +static char *http2env(apr_pool_t *a, const char *w)

a few modules out there have duplicated this function, which is bad;
but as-is it hardly seems like a good API; I guess a function to take
a header name and return the corresponding envvar name would be more
appropriate; it would contain the special logic for
CONTENT_TYPE/CONTENT_LENGTH

mod_fcgid and mod_fastcgi would theoretically have to work around the
CONTENT_TYPE/CONTENT_LENGTH situation to preserve the legacy behavior,
or just slap any script writer that looked at HTTP_CONTENT_TYPE
instead of CONTENT_TYPE

perhaps the whole FcgidPassHeader issue would have been avoided had
there been a config option to pass through [Proxy-]Authorization to
CGIs

(no hurry here to worry about the duplicated code given the other concerns)