mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
BUG/MINOR: hq-interop: adjust parsing/encoding on backend side
HTTP/0.9 is available on top of QUIC. This protocol is reserved for internal use, mostly interop purpose. This patch adjusts HTTP/0.9 layer with the following changes : * version is not emitted anymore on the status line. This is performed as some servers does not parse it correctly. * status line is set explicitely on HTX status-line. This ensures the correct HTTP status code is reported to the upper stream layer. This does not need to be backported.
This commit is contained in:
parent
b901e56acd
commit
536d2aafa3
@ -115,6 +115,7 @@ static ssize_t hq_interop_rcv_buf_res(struct qcs *qcs, struct buffer *b, int fin
|
|||||||
sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags,
|
sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags,
|
||||||
ist("HTTP/1.0"), ist("200"), ist(""));
|
ist("HTTP/1.0"), ist("200"), ist(""));
|
||||||
BUG_ON(!sl);
|
BUG_ON(!sl);
|
||||||
|
sl->info.res.status = 200;
|
||||||
if (fin && !to_copy)
|
if (fin && !to_copy)
|
||||||
sl->flags |= HTX_SL_F_BODYLESS;
|
sl->flags |= HTX_SL_F_BODYLESS;
|
||||||
htx_add_endof(htx, HTX_BLK_EOH);
|
htx_add_endof(htx, HTX_BLK_EOH);
|
||||||
@ -200,7 +201,7 @@ static size_t hq_interop_snd_buf(struct qcs *qcs, struct buffer *buf,
|
|||||||
/* Only GET supported for HTTP/0.9. */
|
/* Only GET supported for HTTP/0.9. */
|
||||||
b_putist(res, ist("GET "));
|
b_putist(res, ist("GET "));
|
||||||
b_putist(res, htx_sl_req_uri(sl));
|
b_putist(res, htx_sl_req_uri(sl));
|
||||||
b_putist(res, ist(" HTTP/0.9\r\n"));
|
b_putist(res, ist("\r\n"));
|
||||||
htx_remove_blk(htx, blk);
|
htx_remove_blk(htx, blk);
|
||||||
total += fsize;
|
total += fsize;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user