File tree 1 file changed +7
-7
lines changed
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) {
1237
1237
ctx = ngx_http_get_module_ctx (r , ngx_http_c_func_module );
1238
1238
1239
1239
if (ctx != NULL ) {
1240
- if (ctx -> done ) {
1240
+ if (! ctx -> waiting_more_body && ctx -> done ) {
1241
1241
/***Done Reading***/
1242
1242
return NGX_DECLINED ;
1243
1243
}
@@ -1270,13 +1270,9 @@ ngx_http_c_func_rewrite_handler(ngx_http_request_t *r) {
1270
1270
return rc ;
1271
1271
}
1272
1272
1273
- #if nginx_version >= 8011
1274
- r -> main -> count -- ;
1275
- #endif
1276
-
1277
1273
if (rc == NGX_AGAIN ) {
1278
1274
ctx -> waiting_more_body = 1 ;
1279
- return NGX_AGAIN ;
1275
+ return NGX_DONE ;
1280
1276
}
1281
1277
1282
1278
return NGX_DECLINED ;
@@ -1301,11 +1297,15 @@ ngx_http_c_func_client_body_handler(ngx_http_request_t *r) {
1301
1297
ngx_http_c_func_internal_ctx_t * ctx ;
1302
1298
ctx = ngx_http_get_module_ctx (r , ngx_http_c_func_module );
1303
1299
1300
+
1301
+ #if nginx_version >= 8011
1302
+ r -> main -> count -- ;
1303
+ #endif
1304
1304
/* waiting_more_body my rewrite phase handler */
1305
1305
if (ctx -> waiting_more_body ) {
1306
1306
ctx -> done = 1 ;
1307
1307
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;
1309
1309
ngx_http_core_run_phases (r );
1310
1310
}
1311
1311
}
You can’t perform that action at this time.
0 commit comments