File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -736,18 +736,20 @@ static ngx_int_t ngx_http_clojure_handler(ngx_http_request_t * r) {
736736 }
737737
738738 if (lcf -> always_read_body || (r -> method & (NGX_HTTP_POST | NGX_HTTP_PUT | NGX_HTTP_PATCH ))) {
739- r -> request_body_in_single_buf = 1 ;
740- r -> request_body_in_clean_file = 1 ;
741- r -> request_body_in_persistent_file = 1 ;
742-
743- rc = ngx_http_read_client_request_body (r , ngx_http_clojure_client_body_handler );
744- if (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE ) {
745- return rc ;
746- }
747-
748- if (rc == NGX_AGAIN ) {
749- ctx -> async_body_read = 1 ;
750- return NGX_DONE ;
739+ if (!ctx -> client_body_done ) {/*maybe done by rewrite handler*/
740+ r -> request_body_in_single_buf = 1 ;
741+ r -> request_body_in_clean_file = 1 ;
742+ r -> request_body_in_persistent_file = 1 ;
743+
744+ rc = ngx_http_read_client_request_body (r , ngx_http_clojure_client_body_handler );
745+ if (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE ) {
746+ return rc ;
747+ }
748+
749+ if (rc == NGX_AGAIN ) {
750+ ctx -> async_body_read = 1 ;
751+ return NGX_DONE ;
752+ }
751753 }
752754 }else {
753755 rc = ngx_http_discard_request_body (r );
You can’t perform that action at this time.
0 commit comments