* 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 */
| 113 | * @return APR_SUCCESS or error |
| 114 | */ |
| 115 | apr_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 |
no test coverage detected