Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 1722:3b7262e720c1 stable-0.5
merge_slashes
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 12 Dec 2007 20:43:39 +0000 |
parents | fbf94b8341bf |
children | 9e04d3259096 |
comparison
equal
deleted
inserted
replaced
1721:b2829cbf9eb4 | 1722:3b7262e720c1 |
---|---|
601 | 601 |
602 | 602 |
603 static void | 603 static void |
604 ngx_http_process_request_line(ngx_event_t *rev) | 604 ngx_http_process_request_line(ngx_event_t *rev) |
605 { | 605 { |
606 ssize_t n; | 606 ssize_t n; |
607 ngx_int_t rc, rv; | 607 ngx_int_t rc, rv; |
608 ngx_connection_t *c; | 608 ngx_connection_t *c; |
609 ngx_http_request_t *r; | 609 ngx_http_request_t *r; |
610 ngx_http_core_srv_conf_t *cscf; | |
610 | 611 |
611 c = rev->data; | 612 c = rev->data; |
612 r = c->data; | 613 r = c->data; |
613 | 614 |
614 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, rev->log, 0, | 615 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, rev->log, 0, |
656 if (r->uri.data == NULL) { | 657 if (r->uri.data == NULL) { |
657 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 658 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
658 return; | 659 return; |
659 } | 660 } |
660 | 661 |
661 rc = ngx_http_parse_complex_uri(r); | 662 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); |
663 | |
664 rc = ngx_http_parse_complex_uri(r, cscf->merge_slashes); | |
662 | 665 |
663 if (rc == NGX_HTTP_PARSE_INVALID_REQUEST) { | 666 if (rc == NGX_HTTP_PARSE_INVALID_REQUEST) { |
664 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 667 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
665 "client sent invalid request"); | 668 "client sent invalid request"); |
666 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | 669 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); |