* SE_FL_RCV_MORE on the SC if more space is needed.
*/
max = channel_recv_max(ic);
- if ((ic->flags & CF_WROTE_DATA) && b_is_large(sc_ib(sc)))
+ if (b_is_small(sc_ib(sc)) || ((ic->flags & CF_WROTE_DATA) && b_is_large(sc_ib(sc))))
max = 0;
ret = CALL_MUX_WITH_RET(conn->mux, rcv_buf(sc, &ic->buf, max, cur_flags));
* SE_FL_RCV_MORE on the SC if more space is needed.
*/
max = channel_recv_max(ic);
- if ((ic->flags & CF_WROTE_DATA) && b_is_large(sc_ib(sc)))
+ if (b_is_small(sc_ib(sc)) || ((ic->flags & CF_WROTE_DATA) && b_is_large(sc_ib(sc))))
max = 0;
ret = appctx_rcv_buf(sc, &ic->buf, max, flags);
if (sc_ep_test(sc, SE_FL_WANT_ROOM)) {
srv = objt_server(s->target);
if (scb->state == SC_ST_ASS && srv && srv->rdr_len && (s->flags & SF_REDIRECTABLE))
http_perform_server_redirect(s, scb);
+
+ if (unlikely(scb->state == SC_ST_QUE && IS_HTX_STRM(s))) {
+ struct buffer sbuf = BUF_NULL;
+
+ if (!htx_move_to_small_buffer(&sbuf, &req->buf))
+ break;
+ b_free(&req->buf);
+ offer_buffers(s, 1);
+ req->buf = sbuf;
+ DBG_TRACE_DEVEL("request moved to a small buffer", STRM_EV_STRM_PROC, s);
+ }
+
} while (scb->state == SC_ST_ASS);
}