summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/proxy/mod_proxy_fcgi.c66
1 files changed, 4 insertions, 62 deletions
diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c
index ab2e83dc83..ee7029002c 100644
--- a/modules/proxy/mod_proxy_fcgi.c
+++ b/modules/proxy/mod_proxy_fcgi.c
@@ -377,67 +377,6 @@ static int handle_headers(request_rec *r,
return 0;
}
-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];
- int i = 0;
-
- memset(asc_line, 0, sizeof(asc_line));
- memset(hex_line, 0, sizeof(hex_line));
-
- while (posn < length) {
- unsigned char c = fheader[posn];
-
- if (i >= 20) {
- i = 0;
-
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01064)
- "HEADER: %s %s", asc_line, hex_line);
-
- memset(asc_line, 0, sizeof(asc_line));
- memset(hex_line, 0, sizeof(hex_line));
- }
-
- if (isprint(c)) {
- asc_line[i] = c;
- }
- else {
- asc_line[i] = '.';
- }
-
- if ((c >> 4) >= 10) {
- hex_line[i * 3] = 'a' + ((c >> 4) - 10);
- }
- else {
- hex_line[i * 3] = '0' + (c >> 4);
- }
-
- if ((c & 0x0F) >= 10) {
- hex_line[i * 3 + 1] = 'a' + ((c & 0x0F) - 10);
- }
- else {
- hex_line[i * 3 + 1] = '0' + (c & 0xF);
- }
-
- hex_line[i * 3 + 2] = ' ';
-
- i++;
- posn++;
- }
-
- if (i != 1) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01065) "HEADER: %s %s",
- asc_line, hex_line);
- }
-
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01066) "HEADER: -EOH-");
-#endif
-}
-
static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
request_rec *r, apr_pool_t *setaside_pool,
apr_uint16_t request_id)
@@ -561,7 +500,10 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
break;
}
- dump_header_to_log(r, farray, AP_FCGI_HEADER_LEN);
+#ifdef FCGI_DUMP_HEADERS
+ ap_log_rdata(APLOG_MARK, APLOG_DEBUG, r, "FastCGI header",
+ farray, AP_FCGI_HEADER_LEN, 0);
+#endif
ap_fcgi_header_fields_from_array(&version, &type, &rid,
&clen, &plen, farray);