Mercurial > hg > nginx
comparison src/http/ngx_http_request_body.c @ 3179:74b74513ed59
update r3167: do not set r->discard_body if the body has been just discarded
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 02 Oct 2009 09:46:04 +0000 |
parents | b208e383657d |
children | 36f6407817dc |
comparison
equal
deleted
inserted
replaced
3178:975f0558aab3 | 3179:74b74513ed59 |
---|---|
467 r->headers_in.content_length_n = 0; | 467 r->headers_in.content_length_n = 0; |
468 return NGX_OK; | 468 return NGX_OK; |
469 } | 469 } |
470 } | 470 } |
471 | 471 |
472 r->discard_body = 1; | |
473 | |
474 r->read_event_handler = ngx_http_read_discarded_request_body_handler; | 472 r->read_event_handler = ngx_http_read_discarded_request_body_handler; |
475 | 473 |
476 if (ngx_handle_read_event(rev, 0) != NGX_OK) { | 474 if (ngx_handle_read_event(rev, 0) != NGX_OK) { |
477 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 475 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
478 } | 476 } |
479 | 477 |
480 if (ngx_http_read_discarded_request_body(r) != NGX_OK) { | 478 if (ngx_http_read_discarded_request_body(r) != NGX_OK) { |
481 r->count++; | 479 r->count++; |
480 r->discard_body = 1; | |
482 } | 481 } |
483 | 482 |
484 return NGX_OK; | 483 return NGX_OK; |
485 } | 484 } |
486 | 485 |