mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: http-client: Trigger an error if first response block isn't a start-line
The first HTX block of a response must be a start-line. There is no reason to wait for something else. And if there are output data in the response channel buffer, it means we must found the start-line.
This commit is contained in:
parent
c08a0dae30
commit
88aa7a780c
@ -654,13 +654,10 @@ void httpclient_applet_io_handler(struct appctx *appctx)
|
|||||||
if (!co_data(res))
|
if (!co_data(res))
|
||||||
goto out;
|
goto out;
|
||||||
htx = htxbuf(&res->buf);
|
htx = htxbuf(&res->buf);
|
||||||
if (htx_is_empty(htx))
|
if (htx_get_first_type(htx) != HTX_BLK_RES_SL)
|
||||||
goto out;
|
goto error;
|
||||||
blk = htx_get_head_blk(htx);
|
blk = DISGUISE(htx_get_head_blk(htx));
|
||||||
if (blk && (htx_get_blk_type(blk) == HTX_BLK_RES_SL))
|
sl = htx_get_blk_ptr(htx, blk);
|
||||||
sl = htx_get_blk_ptr(htx, blk);
|
|
||||||
if (!sl || (!(sl->flags & HTX_SL_F_IS_RESP)))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* Skipp any 1XX interim responses */
|
/* Skipp any 1XX interim responses */
|
||||||
if (sl->info.res.status < 200) {
|
if (sl->info.res.status < 200) {
|
||||||
|
Loading…
Reference in New Issue
Block a user