pull/1058/merge
Sergey Kandaurov 2 weeks ago committed by GitHub
commit e10b5c85b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      src/http/modules/ngx_http_proxy_v2_module.c

@ -974,6 +974,21 @@ ngx_http_proxy_v2_body_output_filter(void *data, ngx_chain_t *in)
return NGX_ERROR;
}
if (!ctx->header_sent) {
/* cleanup after previously unsent request body */
while (ctx->in) {
ln = ctx->in;
ctx->in = ctx->in->next;
ngx_free_chain(r->pool, ln);
}
for (ln = ctx->busy; ln; ln = ln->next) {
ln->buf->pos = ln->buf->last;
}
}
if (in) {
if (ngx_chain_add_copy(r->pool, &ctx->in, in) != NGX_OK) {
return NGX_ERROR;
@ -1188,6 +1203,10 @@ ngx_http_proxy_v2_body_output_filter(void *data, ngx_chain_t *in)
last = 1;
}
if (!ngx_buf_special(in->buf) && !in->buf->in_file) {
in->buf->last_buf = 0;
}
ln = in;
in = in->next;

Loading…
Cancel
Save