Skip to content

Commit 8d0991c

Browse files
author
Valery Kholodkov
committed
Support for Expect: continue
1 parent b6498be commit 8d0991c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ngx_http_upload_module.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ typedef struct ngx_http_upload_ctx_s {
257257
unsigned int raw_input:1;
258258
} ngx_http_upload_ctx_t;
259259

260+
ngx_int_t ngx_http_test_expect(ngx_http_request_t *r);
261+
260262
static ngx_int_t ngx_http_upload_handler(ngx_http_request_t *r);
261263
static ngx_int_t ngx_http_upload_options_handler(ngx_http_request_t *r);
262264
static ngx_int_t ngx_http_upload_body_handler(ngx_http_request_t *r);
@@ -838,6 +840,11 @@ ngx_http_upload_handler(ngx_http_request_t *r)
838840
return rc;
839841
}
840842

843+
if (ngx_http_test_expect(r) != NGX_OK) {
844+
upload_shutdown_ctx(u);
845+
return NGX_HTTP_INTERNAL_SERVER_ERROR;
846+
}
847+
841848
if(upload_start(u, ulcf) != NGX_OK)
842849
return NGX_HTTP_INTERNAL_SERVER_ERROR;
843850

0 commit comments

Comments
 (0)