struct buffer *buf, size_t *ofs, size_t max)
{
int ret;
+ struct htx_blk *blk;
TRACE_ENTER(FCGI_EV_RSP_DATA|FCGI_EV_RSP_HDRS, fstrm->fconn->conn, fstrm, 0, (size_t[]){max});
ret = h1_parse_msg_hdrs(h1m, NULL, htx, buf, *ofs, max);
goto end;
}
+ /* Reject 1xx interim responses. There is no way to handle an interim
+ * response from a FCGI server.
+ */
+ blk = htx_get_head_blk(htx);
+ if (blk && htx_get_blk_type(blk) == HTX_BLK_RES_SL &&
+ ((const struct htx_sl *)htx_get_blk_ptr(htx, blk))->info.res.status < 200) {
+ htx->flags |= HTX_FL_PARSING_ERROR;
+ TRACE_ERROR("1xx interim response not supported", FCGI_EV_RSP_DATA|FCGI_EV_RSP_HDRS|FCGI_EV_FSTRM_ERR, fstrm->fconn->conn, fstrm);
+ fcgi_strm_error(fstrm);
+ fcgi_strm_capture_bad_message(fstrm->fconn, fstrm, h1m, buf);
+ ret = 0;
+ goto end;
+ }
+
/* Reject any message with an unknown transfer-encoding. In fact if any
* encoding other than "chunked". A 422-Unprocessable-Content is
* returned for an invalid request, a 502-Bad-Gateway for an invalid