File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,8 @@ typedef struct ngx_http_upload_ctx_s {
257
257
unsigned int raw_input :1 ;
258
258
} ngx_http_upload_ctx_t ;
259
259
260
+ ngx_int_t ngx_http_test_expect (ngx_http_request_t * r );
261
+
260
262
static ngx_int_t ngx_http_upload_handler (ngx_http_request_t * r );
261
263
static ngx_int_t ngx_http_upload_options_handler (ngx_http_request_t * r );
262
264
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)
838
840
return rc ;
839
841
}
840
842
843
+ if (ngx_http_test_expect (r ) != NGX_OK ) {
844
+ upload_shutdown_ctx (u );
845
+ return NGX_HTTP_INTERNAL_SERVER_ERROR ;
846
+ }
847
+
841
848
if (upload_start (u , ulcf ) != NGX_OK )
842
849
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
843
850
You can’t perform that action at this time.
0 commit comments