Permalink
Browse files

Fixed bug: premature signalling of end of body

  • Loading branch information...
Valery Kholodkov
Valery Kholodkov committed Aug 2, 2010
1 parent 7de7261 commit 332498d130be36cd9a0fe3b299bce633fc27d60a
Showing with 9 additions and 9 deletions.
  1. +9 −9 ngx_http_upload_module.c
View
@@ -2797,17 +2797,17 @@ ngx_http_process_request_body(ngx_http_request_t *r, ngx_chain_t *body)
if(rc != NGX_OK)
return rc;
- if(u->raw_input) {
- // Signal end of body
- if(r->request_body->rest == 0) {
- rc = u->data_handler(u, body->buf->pos, body->buf->pos);
+ body = body->next;
+ }
- if(rc != NGX_OK)
- return rc;
- }
- }
+ if(u->raw_input) {
+ // Signal end of body
+ if(r->request_body->rest == 0) {
+ rc = u->data_handler(u, NULL, NULL);
- body = body->next;
+ if(rc != NGX_OK)
+ return rc;
+ }
}
return NGX_OK;

0 comments on commit 332498d

Please sign in to comment.