comparison src/http/ngx_http_upstream.c @ 420:ad0a34a8efa6 NGINX_0_7_22

nginx 0.7.22 *) Feature: the "none" parameter in the "smtp_auth" directive. Thanks to Maxim Dounin. *) Feature: the "$cookie_..." variables. *) Bugfix: the "directio" directive did not work in XFS filesystem. *) Bugfix: the resolver did not understand big DNS responses. Thanks to Zyb.
author Igor Sysoev <http://sysoev.ru>
date Thu, 20 Nov 2008 00:00:00 +0300
parents b4f69f2ef02c
children 9da1d9d94d18
comparison
equal deleted inserted replaced
419:b986babf3f57 420:ad0a34a8efa6
1335 ngx_http_upstream_finalize_request(r, u, 1335 ngx_http_upstream_finalize_request(r, u,
1336 NGX_HTTP_INTERNAL_SERVER_ERROR); 1336 NGX_HTTP_INTERNAL_SERVER_ERROR);
1337 return; 1337 return;
1338 } 1338 }
1339 1339
1340 if (u->buffer.last - u->buffer.pos >= (ssize_t) u->length) { 1340 n = u->buffer.last - u->buffer.pos;
1341 if (u->input_filter(u->input_filter_ctx, 0) == NGX_ERROR) { 1341
1342 if (n) {
1343 u->buffer.last -= n;
1344
1345 if (u->input_filter(u->input_filter_ctx, n) == NGX_ERROR) {
1342 ngx_http_upstream_finalize_request(r, u, NGX_ERROR); 1346 ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
1343 return; 1347 return;
1344 } 1348 }
1345 1349
1346 ngx_http_upstream_finalize_request(r, u, 0); 1350 if (u->length == 0) {
1347 return; 1351 ngx_http_upstream_finalize_request(r, u, 0);
1352 return;
1353 }
1348 } 1354 }
1349 1355
1350 rev->handler = ngx_http_upstream_process_body_in_memory; 1356 rev->handler = ngx_http_upstream_process_body_in_memory;
1351 1357
1352 ngx_http_upstream_process_body_in_memory(rev); 1358 ngx_http_upstream_process_body_in_memory(rev);