Skip to content

Commit 07dc642

Browse files
committed
Fix nginx when redirectionio is buffering
1 parent 3a42283 commit 07dc642

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ngx_http_redirectionio_module_filter.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ ngx_int_t ngx_http_redirectionio_body_filter(ngx_http_request_t *r, ngx_chain_t
252252
for (cl = in; cl; cl = cl->next) {
253253
tl = ngx_http_redirectionio_body_filter_replace(ctx->body_filter, r->pool, cl);
254254

255+
if (tl == NULL) {
256+
continue;
257+
}
258+
255259
// Last link is not null, set the next of it to the current one
256260
if (ll != NULL) {
257261
ll->next = tl;
@@ -386,7 +390,7 @@ static ngx_chain_t* ngx_http_redirectionio_body_filter_replace(struct REDIRECTIO
386390
return out;
387391
}
388392

389-
return cl;
393+
return NULL;
390394
}
391395

392396
static void ngx_http_redirectionio_response_headers_cleanup(void *response_headers) {

0 commit comments

Comments
 (0)