Changeset c7670f for server/src/http/ngx_http_request.c
- Timestamp:
- 10/30/09 18:13:41 (3 years ago)
- Branches:
- nginx-v0.8
- Parents:
- 178a98
- git-author:
- George Potapov <nephrite@…> (10/30/09 18:13:41)
- git-committer:
- George Potapov <nephrite@…> (10/30/09 18:13:41)
- File:
-
- 1 edited
-
server/src/http/ngx_http_request.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
server/src/http/ngx_http_request.c
r89d9dc rc7670f 382 382 383 383 /* the default server configuration for the address:port */ 384 cscf = addr_conf-> core_srv_conf;384 cscf = addr_conf->default_server; 385 385 386 386 r->main_conf = cscf->ctx->main_conf; … … 1689 1689 #if (NGX_PCRE) 1690 1690 1691 if ( r->virtual_names->nregex) {1691 if (len && r->virtual_names->nregex) { 1692 1692 size_t ncaptures; 1693 1693 ngx_int_t n; … … 1705 1705 for (i = 0; i < r->virtual_names->nregex; i++) { 1706 1706 1707 if (sn[i]. captures && r->captures == NULL) {1707 if (sn[i].server->captures && r->captures == NULL) { 1708 1708 1709 1709 ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3; … … 1731 1731 /* match */ 1732 1732 1733 cscf = sn[i]. core_srv_conf;1733 cscf = sn[i].server; 1734 1734 1735 1735 r->ncaptures = ncaptures; … … 2102 2102 ngx_http_core_loc_conf_t *clcf; 2103 2103 2104 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 2105 2104 2106 if (r->main->count != 1) { 2107 2108 if (r->discard_body) { 2109 r->read_event_handler = ngx_http_discarded_request_body_handler; 2110 2111 if (r->lingering_time == 0) { 2112 r->lingering_time = ngx_time() 2113 + (time_t) (clcf->lingering_time / 1000); 2114 ngx_add_timer(r->connection->read, clcf->lingering_timeout); 2115 } 2116 } 2117 2105 2118 ngx_http_close_request(r, 0); 2106 2119 return; 2107 2120 } 2108 2109 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);2110 2121 2111 2122 if (!ngx_terminate … … 2134 2145 r->http_state = NGX_HTTP_WRITING_REQUEST_STATE; 2135 2146 2136 r->read_event_handler = ngx_http_test_reading; 2147 r->read_event_handler = r->discard_body ? 2148 ngx_http_discarded_request_body_handler: 2149 ngx_http_test_reading; 2137 2150 r->write_event_handler = ngx_http_writer; 2138 2151 … … 2235 2248 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, wev->log, 0, 2236 2249 "http writer done: \"%V?%V\"", &r->uri, &r->args); 2250 2251 r->write_event_handler = ngx_http_request_empty_handler; 2237 2252 2238 2253 ngx_http_finalize_request(r, rc);
Note: See TracChangeset
for help on using the changeset viewer.
