You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2010/12/28 15:53:59 UTC
svn commit: r1053365 - /httpd/httpd/trunk/server/util_script.c
Author: sf
Date: Tue Dec 28 14:53:59 2010
New Revision: 1053365
URL: http://svn.apache.org/viewvc?rev=1053365&view=rev
Log:
Log a trace message if we drop a header with an invalid name
Modified:
httpd/httpd/trunk/server/util_script.c
Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=1053365&r1=1053364&r2=1053365&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Tue Dec 28 14:53:59 2010
@@ -54,9 +54,9 @@
APLOG_USE_MODULE(core);
-static char *http2env(apr_pool_t *a, const char *w)
+static char *http2env(request_rec *r, const char *w)
{
- char *res = (char *)apr_palloc(a, sizeof("HTTP_") + strlen(w));
+ char *res = (char *)apr_palloc(r->pool, sizeof("HTTP_") + strlen(w));
char *cp = res;
char c;
@@ -74,6 +74,9 @@ static char *http2env(apr_pool_t *a, con
*cp++ = '_';
}
else {
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
+ "Not exporting header with invalid name as envvar: %s",
+ ap_escape_logitem(r->pool, w));
return NULL;
}
}
@@ -188,7 +191,7 @@ AP_DECLARE(void) ap_add_common_vars(requ
}
#endif
else
- add_unless_null(e, http2env(r->pool, hdrs[i].key), hdrs[i].val);
+ add_unless_null(e, http2env(r, hdrs[i].key), hdrs[i].val);
}
env_temp = apr_table_get(r->subprocess_env, "PATH");