@@ -124,8 +124,6 @@ ngx_int_t ngx_http_redirectionio_body_filter(ngx_http_request_t *r, ngx_chain_t
124124 ngx_http_redirectionio_ctx_t * ctx ;
125125 ngx_http_redirectionio_conf_t * conf ;
126126 ngx_int_t status ;
127- ngx_chain_t * cl ;
128- ngx_str_t buffer_str ;
129127
130128 conf = ngx_http_get_module_loc_conf (r , ngx_http_redirectionio_module );
131129
@@ -151,7 +149,7 @@ ngx_int_t ngx_http_redirectionio_body_filter(ngx_http_request_t *r, ngx_chain_t
151149 // Check if we are waiting for filtering headers or connection
152150 if (ctx -> wait_for_header_filtering || ctx -> wait_for_connection ) {
153151 // Set request is buffered to avoid its destruction by nginx
154- r -> blocked = 1 ;
152+ r -> buffered = 1 ;
155153
156154 return NGX_AGAIN ;
157155 }
@@ -172,7 +170,7 @@ ngx_int_t ngx_http_redirectionio_body_filter(ngx_http_request_t *r, ngx_chain_t
172170 if (status == NGX_AGAIN ) {
173171 ctx -> wait_for_connection = 1 ;
174172
175- r -> blocked = 1 ;
173+ r -> buffered = 1 ;
176174
177175 return status ;
178176 }
@@ -196,7 +194,7 @@ ngx_int_t ngx_http_redirectionio_body_filter(ngx_http_request_t *r, ngx_chain_t
196194 ctx -> first_buffer = 0 ;
197195 }
198196
199- r -> blocked = 1 ;
197+ r -> buffered = 1 ;
200198
201199 // Stream body
202200 return NGX_AGAIN ;
@@ -345,7 +343,7 @@ static void ngx_http_redirectionio_read_filter_body_handler(ngx_event_t *rev, u_
345343 ngx_http_redirectionio_conf_t * conf ;
346344 ngx_http_request_t * r ;
347345 ngx_connection_t * c ;
348- ngx_chain_t * new_chain , * chain_sent ;
346+ ngx_chain_t * new_chain ;
349347
350348 c = rev -> data ;
351349 r = c -> data ;
@@ -376,7 +374,7 @@ static void ngx_http_redirectionio_read_filter_body_handler(ngx_event_t *rev, u_
376374
377375 ngx_http_next_body_filter (r , new_chain );
378376
379- r -> blocked = 0 ;
377+ r -> buffered = 0 ;
380378
381379 ngx_http_finalize_request (r , NGX_OK );
382380
@@ -410,10 +408,7 @@ static void ngx_http_redirectionio_read_filter_body_handler(ngx_event_t *rev, u_
410408}
411409
412410static void ngx_http_redirectionio_finalize_request (ngx_http_request_t * r , ngx_http_redirectionio_ctx_t * ctx ) {
413- ngx_int_t status ;
414- ngx_http_redirectionio_conf_t * conf ;
415-
416- conf = ngx_http_get_module_loc_conf (r , ngx_http_redirectionio_module );
411+ ngx_int_t status ;
417412
418413 if (!ctx -> headers_sent ) {
419414 status = ngx_http_next_header_filter (r );
@@ -434,7 +429,7 @@ static void ngx_http_redirectionio_finalize_request(ngx_http_request_t *r, ngx_h
434429 }
435430 }
436431
437- r -> blocked = 0 ;
432+ r -> buffered = 0 ;
438433
439434 ngx_http_finalize_request (r , NGX_OK );
440435}
0 commit comments