comparison src/http/ngx_http_upstream.c @ 178:87699398f955 NGINX_0_3_36

nginx 0.3.36 *) Feature: the ngx_http_addition_filter_module. *) Feature: the "proxy_pass" and "fastcgi_pass" directives may be used inside the "if" block. *) Feature: the "proxy_ignore_client_abort" and "fastcgi_ignore_client_abort" directives. *) Feature: the "$request_completion" variable. *) Feature: the ngx_http_perl_module supports the $r->request_method and $r->remote_addr. *) Feature: the ngx_http_ssi_module supports the "elif" command. *) Bugfix: the "\/" string in the expression of the "if" command of the ngx_http_ssi_module was treated incorrectly. *) Bugfix: in the regular expressions in the "if" command of the ngx_http_ssi_module. *) Bugfix: if the relative path was specified in the "client_body_temp_path", "proxy_temp_path", "fastcgi_temp_path", and "perl_modules" directives, then the directory was used relatively to a current path but not to a server prefix.
author Igor Sysoev <http://sysoev.ru>
date Wed, 05 Apr 2006 00:00:00 +0400
parents 1b490fc19afa
children 54aabf2b0bc6
comparison
equal deleted inserted replaced
177:4a3ddd758222 178:87699398f955
275 275
276 if (c->read->timer_set) { 276 if (c->read->timer_set) {
277 ngx_del_timer(c->read); 277 ngx_del_timer(c->read);
278 } 278 }
279 279
280 if (!(r->http_version == NGX_HTTP_VERSION_9 && r->header_only)) { 280 u = r->upstream;
281 /* not a post_action */ 281
282 282 if (!r->post_action && !u->conf->ignore_client_abort) {
283 r->read_event_handler = ngx_http_upstream_rd_check_broken_connection; 283 r->read_event_handler = ngx_http_upstream_rd_check_broken_connection;
284 r->write_event_handler = ngx_http_upstream_wr_check_broken_connection; 284 r->write_event_handler = ngx_http_upstream_wr_check_broken_connection;
285 } 285 }
286 286
287 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { 287 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) {
293 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 293 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
294 return; 294 return;
295 } 295 }
296 } 296 }
297 } 297 }
298
299 u = r->upstream;
300 298
301 if (r->request_body) { 299 if (r->request_body) {
302 u->request_bufs = r->request_body->bufs; 300 u->request_bufs = r->request_body->bufs;
303 } 301 }
304 302
1206 u->length = NGX_MAX_SIZE_T_VALUE; 1204 u->length = NGX_MAX_SIZE_T_VALUE;
1207 } 1205 }
1208 1206
1209 rc = ngx_http_send_header(r); 1207 rc = ngx_http_send_header(r);
1210 1208
1211 if (rc == NGX_ERROR 1209 if (rc == NGX_ERROR || rc > NGX_OK || r->post_action) {
1212 || rc > NGX_OK
1213 /* post_action */
1214 || (r->http_version == NGX_HTTP_VERSION_9 && r->header_only)) {
1215 ngx_http_upstream_finalize_request(r, u, rc); 1210 ngx_http_upstream_finalize_request(r, u, rc);
1216 return; 1211 return;
1217 } 1212 }
1218 1213
1219 u->header_sent = 1; 1214 u->header_sent = 1;
1945 return; 1940 return;
1946 } 1941 }
1947 1942
1948 r->connection->log->action = "sending to client"; 1943 r->connection->log->action = "sending to client";
1949 1944
1950 if (rc == 0 1945 if (rc == 0 && r == r->main && !r->post_action) {
1951 && r == r->main
1952 /* not a post_action */
1953 && !(r->http_version == NGX_HTTP_VERSION_9 && r->header_only))
1954 {
1955 rc = ngx_http_send_special(r, NGX_HTTP_LAST); 1946 rc = ngx_http_send_special(r, NGX_HTTP_LAST);
1956 } 1947 }
1957 1948
1958 ngx_http_finalize_request(r, rc); 1949 ngx_http_finalize_request(r, rc);
1959 } 1950 }