diff options
author | Stefan Fritsch <sf@apache.org> | 2011-07-16 23:53:18 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-07-16 23:53:18 +0200 |
commit | beb3ea9c11ef0fb6396403120f29d9ab2cae3215 (patch) | |
tree | 6d5994e64b06a8a5292c1e69f893bde01470211c /modules | |
parent | improve readability of 'malformed header from script' message and simplify code (diff) | |
download | apache2-beb3ea9c11ef0fb6396403120f29d9ab2cae3215.tar.xz apache2-beb3ea9c11ef0fb6396403120f29d9ab2cae3215.zip |
Add more (trace) logging to the ap_scan_script_header*() functions
Add ap_scan_script_header*_ex() functions that take a module index for
logging.
Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the
new functions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/arch/win32/mod_isapi.c | 8 | ||||
-rw-r--r-- | modules/generators/mod_asis.c | 2 | ||||
-rw-r--r-- | modules/generators/mod_cgi.c | 4 | ||||
-rw-r--r-- | modules/generators/mod_cgid.c | 4 | ||||
-rw-r--r-- | modules/proxy/mod_proxy_fcgi.c | 4 | ||||
-rw-r--r-- | modules/proxy/mod_proxy_scgi.c | 3 |
6 files changed, 15 insertions, 10 deletions
diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index 682bd6411d..71a2881ae2 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -714,12 +714,12 @@ static apr_ssize_t send_response_header(isapi_cid *cid, old_status = cid->r->status; if (stat) { - res = ap_scan_script_header_err_strs(cid->r, NULL, &termch, &termarg, - stat, head, NULL); + res = ap_scan_script_header_err_strs_ex(cid->r, NULL, + APLOG_MODULE_INDEX, &termch, &termarg, stat, head, NULL); } else { - res = ap_scan_script_header_err_strs(cid->r, NULL, &termch, &termarg, - head, NULL); + res = ap_scan_script_header_err_strs_ex(cid->r, NULL, + APLOG_MODULE_INDEX, &termch, &termarg, head, NULL); } /* Set our status. */ diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c index 0809a8446b..5c724c020e 100644 --- a/modules/generators/mod_asis.c +++ b/modules/generators/mod_asis.c @@ -56,7 +56,7 @@ static int asis_handler(request_rec *r) return HTTP_FORBIDDEN; } - ap_scan_script_header_err(r, f, NULL); + ap_scan_script_header_err_ex(r, f, NULL, APLOG_MODULE_INDEX); location = apr_table_get(r->headers_out, "Location"); if (location && location[0] == '/' && diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 29eca51f26..02a5700f16 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -940,7 +940,9 @@ static int cgi_handler(request_rec *r) char sbuf[MAX_STRING_LEN]; int ret; - if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) { + if ((ret = ap_scan_script_header_err_brigade_ex(r, bb, sbuf, + APLOG_MODULE_INDEX))) + { ret = log_script(r, conf, ret, dbuf, sbuf, bb, script_err); /* diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 148ff534d4..a18fa21e1b 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1543,7 +1543,9 @@ static int cgid_handler(request_rec *r) b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); - if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) { + if ((ret = ap_scan_script_header_err_brigade_ex(r, bb, sbuf, + APLOG_MODULE_INDEX))) + { ret = log_script(r, conf, ret, dbuf, sbuf, bb, NULL); /* diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c index e0f264bf62..050021878c 100644 --- a/modules/proxy/mod_proxy_fcgi.c +++ b/modules/proxy/mod_proxy_fcgi.c @@ -741,8 +741,8 @@ recv_again: int status; seen_end_of_headers = 1; - status = ap_scan_script_header_err_brigade(r, ob, - NULL); + status = ap_scan_script_header_err_brigade_ex(r, ob, + NULL, APLOG_MODULE_INDEX); /* suck in all the rest */ if (status != OK) { apr_bucket *tmp_b; diff --git a/modules/proxy/mod_proxy_scgi.c b/modules/proxy/mod_proxy_scgi.c index cdd33eb8d9..fc7e488c59 100644 --- a/modules/proxy/mod_proxy_scgi.c +++ b/modules/proxy/mod_proxy_scgi.c @@ -369,7 +369,8 @@ static int pass_response(request_rec *r, proxy_conn_rec *conn) b = apr_bucket_eos_create(r->connection->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); - status = ap_scan_script_header_err_brigade(r, bb, NULL); + status = ap_scan_script_header_err_brigade_ex(r, bb, NULL, + APLOG_MODULE_INDEX); if (status != OK) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "proxy: " PROXY_FUNCTION ": error reading response " |