Skip to content

Commit

Permalink
Fix nginx when redirectionio is buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz committed Dec 1, 2020
1 parent 3a42283 commit 07dc642
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ngx_http_redirectionio_module_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ ngx_int_t ngx_http_redirectionio_body_filter(ngx_http_request_t *r, ngx_chain_t
for (cl = in; cl; cl = cl->next) {
tl = ngx_http_redirectionio_body_filter_replace(ctx->body_filter, r->pool, cl);

if (tl == NULL) {
continue;
}

// Last link is not null, set the next of it to the current one
if (ll != NULL) {
ll->next = tl;
Expand Down Expand Up @@ -386,7 +390,7 @@ static ngx_chain_t* ngx_http_redirectionio_body_filter_replace(struct REDIRECTIO
return out;
}

return cl;
return NULL;
}

static void ngx_http_redirectionio_response_headers_cleanup(void *response_headers) {
Expand Down

0 comments on commit 07dc642

Please sign in to comment.