diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-20 07:05:50 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-20 07:05:50 +0000 |
commit | bb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8 (patch) | |
tree | 686cdfcc4199f807495a150e410f43940c4451cc /src/http/ngx_http_request.c | |
parent | 160d774afcf3cdd4f999489211eb9d78bf82439a (diff) | |
download | nginx-bb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8.tar.gz nginx-bb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8.zip |
nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 62c9a666a..ccaa73f7d 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -157,7 +157,7 @@ ngx_log_debug(rev->log, "IN: %08x" _ in_port); if (in_port->addrs.nelts > 1) { /* - * there're the several addresses on this port and one of them + * There're the several addresses on this port and one of them * is "*:port" so getsockname() is needed to determine * the server address. * AcceptEx() already gave this address. @@ -346,11 +346,13 @@ static void ngx_http_process_request_line(ngx_event_t *rev) r->request_line.len = r->request_end - r->request_start; - /* if the large client headers are enabled then - we need to copy a request line */ - if (cscf->large_client_header) { + /* + * if the large client headers are enabled then + * we need to copy a request line + */ + r->request_line.data = ngx_palloc(r->pool, r->request_line.len + 1); if (r->request_line.data == NULL) { ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); @@ -366,9 +368,11 @@ static void ngx_http_process_request_line(ngx_event_t *rev) r->request_line.data[r->request_line.len] = '\0'; } - /* copy URI extention if it exists */ if (r->uri_ext) { + + /* copy URI extention */ + if (r->args_start) { r->exten.len = r->args_start - 1 - r->uri_ext; } else { @@ -384,9 +388,10 @@ static void ngx_http_process_request_line(ngx_event_t *rev) ngx_cpystrn(r->exten.data, r->uri_ext, r->exten.len + 1); } - /* copy URI arguments if they exist */ - if (r->args_start && r->uri_end > r->args_start) { + + /* copy URI arguments */ + r->args.len = r->uri_end - r->args_start; if (!(r->args.data = ngx_palloc(r->pool, r->args.len + 1))) { @@ -446,8 +451,8 @@ static void ngx_http_process_request_line(ngx_event_t *rev) /* * If it's a pipelined request and a request line is not complete - * then we need to copy it to the start of the r->header_in hunk. - * We need to copy it here only if the large client headers + * then we have to copy it to the start of the r->header_in hunk. + * We have to copy it here only if the large client headers * are enabled otherwise a request line had been already copied * to the start of the r->header_in hunk in ngx_http_set_keepalive(). */ |