MCPcopy Create free account
hub / github.com/apache/httpd / ajp_msg_log

Function ajp_msg_log

modules/proxy/ajp_msg.c:115–142  ·  view source on GitHub ↗

* Log an AJP message * * @param request The current request * @param msg AJP Message to dump * @param err error string to display * @return APR_SUCCESS or error */

Source from the content-addressed store, hash-verified

113 * @return APR_SUCCESS or error
114 */
115apr_status_t ajp_msg_log(request_rec *r, ajp_msg_t *msg, char *err)
116{
117 int level;
118 apr_size_t count;
119 char *buf, *next;
120 apr_status_t rc = APR_SUCCESS;
121
122 if (APLOGrtrace7(r)) {
123 level = APLOG_TRACE7;
124 count = 1024;
125 if (APLOGrtrace8(r)) {
126 level = APLOG_TRACE8;
127 count = AJP_MAX_BUFFER_SZ;
128 }
129 rc = ajp_msg_dump(r->pool, msg, err, count, &buf);
130 if (rc == APR_SUCCESS) {
131 while ((next = ap_strchr(buf, '\n'))) {
132 *next = '\0';
133 /* Intentional no APLOGNO */
134 ap_log_rerror(APLOG_MARK, level, 0, r, "%s", buf);
135 buf = next + 1;
136 }
137 /* Intentional no APLOGNO */
138 ap_log_rerror(APLOG_MARK, level, 0, r, "%s", buf);
139 }
140 }
141 return rc;
142}
143
144/**
145 * Check a new AJP Message by looking at signature and return its size

Callers 4

ajp_handle_cping_cpongFunction · 0.85
ajp_send_headerFunction · 0.85
ajp_read_headerFunction · 0.85
ap_proxy_ajp_requestFunction · 0.85

Calls 2

ajp_msg_dumpFunction · 0.85
ap_strchrFunction · 0.85

Tested by

no test coverage detected