Skip to content

Commit

Permalink
Fixed bug: premature signalling of end of body
Browse files Browse the repository at this point in the history
  • Loading branch information
Valery Kholodkov committed Aug 2, 2010
1 parent 7de7261 commit 332498d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ngx_http_upload_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 332498d

Please sign in to comment.