mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 17:17:06 +02:00
MINOR: compression: pass the channel to http_compression_buffer_end()
This will be needed to access the output data count from the channel after the buffer/channel changes.
This commit is contained in:
parent
f17f19f1a7
commit
4d452384a3
@ -61,7 +61,7 @@ static int http_compression_buffer_add_data(struct comp_state *st,
|
|||||||
struct buffer *in,
|
struct buffer *in,
|
||||||
struct buffer *out, int sz);
|
struct buffer *out, int sz);
|
||||||
static int http_compression_buffer_end(struct comp_state *st, struct stream *s,
|
static int http_compression_buffer_end(struct comp_state *st, struct stream *s,
|
||||||
struct buffer **in, struct buffer **out,
|
struct channel *chn, struct buffer **out,
|
||||||
int end);
|
int end);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@ -306,7 +306,7 @@ comp_http_forward_data(struct stream *s, struct filter *filter,
|
|||||||
|
|
||||||
st->consumed = len - st->hdrs_len - st->tlrs_len;
|
st->consumed = len - st->hdrs_len - st->tlrs_len;
|
||||||
b_adv(msg->chn->buf, flt_rsp_fwd(filter) + st->hdrs_len);
|
b_adv(msg->chn->buf, flt_rsp_fwd(filter) + st->hdrs_len);
|
||||||
ret = http_compression_buffer_end(st, s, &msg->chn->buf, &zbuf, msg->msg_state >= HTTP_MSG_TRAILERS);
|
ret = http_compression_buffer_end(st, s, msg->chn, &zbuf, msg->msg_state >= HTTP_MSG_TRAILERS);
|
||||||
b_rew(msg->chn->buf, flt_rsp_fwd(filter) + st->hdrs_len);
|
b_rew(msg->chn->buf, flt_rsp_fwd(filter) + st->hdrs_len);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
@ -666,10 +666,10 @@ http_compression_buffer_add_data(struct comp_state *st, struct buffer *in,
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
http_compression_buffer_end(struct comp_state *st, struct stream *s,
|
http_compression_buffer_end(struct comp_state *st, struct stream *s,
|
||||||
struct buffer **in, struct buffer **out,
|
struct channel *chn, struct buffer **out,
|
||||||
int end)
|
int end)
|
||||||
{
|
{
|
||||||
struct buffer *ib = *in, *ob = *out;
|
struct buffer *ib = chn->buf, *ob = *out;
|
||||||
char *tail;
|
char *tail;
|
||||||
int to_forward, left;
|
int to_forward, left;
|
||||||
|
|
||||||
@ -774,7 +774,7 @@ http_compression_buffer_end(struct comp_state *st, struct stream *s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* swap the buffers */
|
/* swap the buffers */
|
||||||
*in = ob;
|
chn->buf = ob;
|
||||||
*out = ib;
|
*out = ib;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user