Changeset c7670f for server/src/http/ngx_http_request_body.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_body.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
server/src/http/ngx_http_request_body.c
r89d9dc rc7670f 14 14 static ngx_int_t ngx_http_write_request_body(ngx_http_request_t *r, 15 15 ngx_chain_t *body); 16 static void ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r);17 16 static ngx_int_t ngx_http_read_discarded_request_body(ngx_http_request_t *r); 18 17 static ngx_int_t ngx_http_test_expect(ngx_http_request_t *r); … … 461 460 if (size) { 462 461 if (r->headers_in.content_length_n > size) { 462 r->header_in->pos += size; 463 463 r->headers_in.content_length_n -= size; 464 464 … … 470 470 } 471 471 472 r->read_event_handler = ngx_http_ read_discarded_request_body_handler;472 r->read_event_handler = ngx_http_discarded_request_body_handler; 473 473 474 474 if (ngx_handle_read_event(rev, 0) != NGX_OK) { … … 488 488 489 489 490 staticvoid491 ngx_http_ read_discarded_request_body_handler(ngx_http_request_t *r)490 void 491 ngx_http_discarded_request_body_handler(ngx_http_request_t *r) 492 492 { 493 493 ngx_int_t rc; … … 503 503 c->timedout = 1; 504 504 c->error = 1; 505 ngx_http_finalize_request(r, 0);505 ngx_http_finalize_request(r, NGX_ERROR); 506 506 return; 507 507 } … … 513 513 r->discard_body = 0; 514 514 r->lingering_close = 0; 515 ngx_http_finalize_request(r, 0);515 ngx_http_finalize_request(r, NGX_ERROR); 516 516 return; 517 517 } … … 524 524 525 525 if (rc == NGX_OK) { 526 527 526 r->discard_body = 0; 528 527 r->lingering_close = 0; 529 530 if (r->done) { 531 ngx_http_finalize_request(r, 0); 532 } 533 528 ngx_http_finalize_request(r, NGX_DONE); 534 529 return; 535 530 } … … 539 534 if (ngx_handle_read_event(rev, 0) != NGX_OK) { 540 535 c->error = 1; 541 ngx_http_finalize_request(r, rc);536 ngx_http_finalize_request(r, NGX_ERROR); 542 537 return; 543 538 }
Note: See TracChangeset
for help on using the changeset viewer.
