Skip to content

Commit

Permalink
Fix for fdintino#124
Browse files Browse the repository at this point in the history
  • Loading branch information
Valery Kholodkov committed Feb 9, 2020
1 parent 41ce418 commit 4423994
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ngx_http_upload_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,10 @@ static ngx_int_t ngx_http_upload_body_handler(ngx_http_request_t *r) { /* {{{ */
ngx_str_t dummy = ngx_string("<ngx_upload_module_dummy>");
ngx_table_elt_t *h;

if(ngx_http_upload_add_headers(r, ulcf) != NGX_OK) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}

if(ctx->prevent_output) {
r->headers_out.status = NGX_HTTP_CREATED;

Expand Down Expand Up @@ -1687,10 +1691,6 @@ static void ngx_http_upload_finish_handler(ngx_http_upload_ctx_t *u) { /* {{{ */
, &u->output_file.name
);

if (ngx_http_upload_add_headers(r, ulcf) != NGX_OK) {
goto rollback;
}

if(ulcf->aggregate_field_templates) {
af = ulcf->aggregate_field_templates->elts;
for (i = 0; i < ulcf->aggregate_field_templates->nelts; i++) {
Expand Down

0 comments on commit 4423994

Please sign in to comment.