File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1237,7 +1237,7 @@ ngx_http_c_func_rewrite_handler(ngx_http_request_t *r) {
12371237 ctx = ngx_http_get_module_ctx (r , ngx_http_c_func_module );
12381238
12391239 if (ctx != NULL ) {
1240- if (ctx -> done ) {
1240+ if (! ctx -> waiting_more_body && ctx -> done ) {
12411241 /***Done Reading***/
12421242 return NGX_DECLINED ;
12431243 }
@@ -1270,13 +1270,9 @@ ngx_http_c_func_rewrite_handler(ngx_http_request_t *r) {
12701270 return rc ;
12711271 }
12721272
1273- #if nginx_version >= 8011
1274- r -> main -> count -- ;
1275- #endif
1276-
12771273 if (rc == NGX_AGAIN ) {
12781274 ctx -> waiting_more_body = 1 ;
1279- return NGX_AGAIN ;
1275+ return NGX_DONE ;
12801276 }
12811277
12821278 return NGX_DECLINED ;
@@ -1301,11 +1297,15 @@ ngx_http_c_func_client_body_handler(ngx_http_request_t *r) {
13011297 ngx_http_c_func_internal_ctx_t * ctx ;
13021298 ctx = ngx_http_get_module_ctx (r , ngx_http_c_func_module );
13031299
1300+
1301+ #if nginx_version >= 8011
1302+ r -> main -> count -- ;
1303+ #endif
13041304 /* waiting_more_body my rewrite phase handler */
13051305 if (ctx -> waiting_more_body ) {
13061306 ctx -> done = 1 ;
13071307 ctx -> waiting_more_body = 0 ;
1308- r -> write_event_handler = ngx_http_core_run_phases ;
1308+ // r->write_event_handler = ngx_http_core_run_phases;
13091309 ngx_http_core_run_phases (r );
13101310 }
13111311}
You can’t perform that action at this time.
0 commit comments