Skip to content

Commit c0e520c

Browse files
committed
MINOR: hq_interop: masquerade HTX response as chunk
1 parent 0a47187 commit c0e520c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/hq_interop.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,14 @@ static ssize_t hq_interop_rcv_buf_res(struct qcs *qcs, struct buffer *b, int fin
130130
ist("HTTP/1.0"), ist("200"), ist(""));
131131
BUG_ON(!sl);
132132
sl->info.res.status = 200;
133-
if (fin && !to_copy)
133+
if (fin && !to_copy) {
134134
sl->flags |= HTX_SL_F_BODYLESS;
135+
}
136+
else if (to_copy) {
137+
sl->flags |= HTX_SL_F_XFER_LEN|HTX_SL_F_CHNK;
138+
htx_add_header(htx, ist("transfer-encoding"), ist("chunked"));
139+
}
140+
135141
htx_add_endof(htx, HTX_BLK_EOH);
136142
}
137143

0 commit comments

Comments
 (0)