r1657 merge:

log entire request line instead of URI only
This commit is contained in:
Igor Sysoev 2007-12-12 21:05:17 +00:00
parent 142d14d203
commit 8ae336f5ad
1 changed files with 13 additions and 20 deletions

View File

@ -2599,28 +2599,21 @@ ngx_http_log_error_handler(ngx_http_request_t *r, ngx_http_request_t *sr,
buf = p;
}
if (r->unparsed_uri.data) {
p = ngx_snprintf(buf, len, ", URL: \"%V\"", &r->unparsed_uri);
if (r->request_line.data == NULL && r->request_start) {
for (p = r->request_start; p < r->header_in->last; p++) {
if (*p == CR || *p == LF) {
break;
}
}
r->request_line.len = p - r->request_start;
r->request_line.data = r->request_start;
}
if (r->request_line.len) {
p = ngx_snprintf(buf, len, ", request: \"%V\"", &r->request_line);
len -= p - buf;
buf = p;
} else {
if (r->request_line.data == NULL && r->request_start) {
for (p = r->request_start; p < r->header_in->last; p++) {
if (*p == CR || *p == LF) {
break;
}
}
r->request_line.len = p - r->request_start;
r->request_line.data = r->request_start;
}
if (r->request_line.len) {
p = ngx_snprintf(buf, len, ", request: \"%V\"", &r->request_line);
len -= p - buf;
buf = p;
}
}
if (r != sr) {