From 966df72b7ca8e5ce79af396775a80da911b89be2 Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Sat, 30 Jul 2011 10:58:34 +0000 Subject: [PATCH] Improve logging for mod_proxy_ajp. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1152452 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 2 ++ modules/proxy/ajp_header.c | 2 ++ modules/proxy/ajp_utils.c | 2 ++ modules/proxy/mod_proxy_ajp.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index b0bff87595..2896cb2a94 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache 2.3.14 + *) mod_proxy_ajp: Improve trace logging. [Rainer Jung] + *) mod_proxy_ajp: Respect "reuse" flag in END_REPONSE packets. [Rainer Jung] diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c index 7a1aaddbe1..0c8a333dd4 100644 --- a/modules/proxy/ajp_header.c +++ b/modules/proxy/ajp_header.c @@ -638,6 +638,7 @@ apr_status_t ajp_send_header(apr_socket_t *sock, } rc = ajp_ilink_send(sock, msg); + ajp_msg_log(r, msg, "ajp_send_header: ajp_ilink_send packet dump"); if (rc != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "ajp_send_header: ajp_ilink_send failed"); @@ -681,6 +682,7 @@ apr_status_t ajp_read_header(apr_socket_t *sock, "ajp_read_header: ajp_ilink_receive failed"); return rc; } + ajp_msg_log(r, *msg, "ajp_read_header: ajp_ilink_receive packet dump"); rc = ajp_msg_peek_uint8(*msg, &result); ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server, "ajp_read_header: ajp_ilink_received %s (0x%02x)", diff --git a/modules/proxy/ajp_utils.c b/modules/proxy/ajp_utils.c index b6cea731eb..f89b10f61f 100644 --- a/modules/proxy/ajp_utils.c +++ b/modules/proxy/ajp_utils.c @@ -48,6 +48,7 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock, } rc = ajp_ilink_send(sock, msg); + ajp_msg_log(r, msg, "ajp_handle_cping_cpong: ajp_ilink_send packet dump"); if (rc != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "ajp_handle_cping_cpong: ajp_ilink_send failed"); @@ -78,6 +79,7 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock, goto cleanup; } + ajp_msg_log(r, msg, "ajp_handle_cping_cpong: ajp_ilink_receive packet dump"); rv = ajp_msg_get_uint8(msg, &result); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index bf435f6b22..b17d7ae39a 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -289,6 +289,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, "proxy: got %" APR_SIZE_T_FMT " bytes of data", bufsiz); if (bufsiz > 0) { status = ajp_send_data_msg(conn->sock, msg, bufsiz); + ajp_msg_log(r, msg, "First ajp_send_data_msg: ajp_ilink_send packet dump"); if (status != APR_SUCCESS) { /* We had a failure: Close connection to backend */ conn->close++; @@ -410,6 +411,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, ajp_msg_reset(msg); /* will go in ajp_send_data_msg */ status = ajp_send_data_msg(conn->sock, msg, bufsiz); + ajp_msg_log(r, msg, "ajp_send_data_msg after CMD_AJP13_GET_BODY_CHUNK: ajp_ilink_send packet dump"); if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server, "ajp_send_data_msg failed"); -- 2.40.0