return b_almost_full(buf);
}
-/* Cut the first <n> pending bytes in a contiguous buffer. The caller must
- * ensure that <n> is smaller than the actual buffer's length. This is mainly
- * used to remove empty lines at the beginning of a request or a response.
- */
-static inline void bi_fast_delete(struct buffer *buf, int n)
-{
- buf->len -= n;
- buf->head += n;
-}
-
/* This function writes the string <str> at position <pos> which must be in
* buffer <b>, and moves <end> just after the end of <str>. <b>'s parameters
* (l, r, lr) are updated to be valid after the shift. the shift value
if (co_data(msg->chn))
goto http_msg_ood;
/* Remove empty leading lines, as recommended by RFC2616. */
- bi_fast_delete(buf, ptr - input);
+ b_del(buf, ptr - input);
}
msg->sol = 0;
msg->sl.st.l = 0; /* used in debug mode */
if (co_data(msg->chn))
goto http_msg_ood;
/* Remove empty leading lines, as recommended by RFC2616. */
- bi_fast_delete(buf, ptr - input);
+ b_del(buf, ptr - input);
}
msg->sol = 0;
msg->sl.rq.l = 0; /* used in debug mode */
if (htxn->s->txn) {
/* HTTP mode, let's stay in sync with the stream */
- bi_fast_delete(ic->buf, htxn->s->txn->req.sov);
+ b_del(ic->buf, htxn->s->txn->req.sov);
htxn->s->txn->req.next -= htxn->s->txn->req.sov;
htxn->s->txn->req.sov = 0;
ic->analysers &= AN_REQ_HTTP_XFER_BODY;
FLT_STRM_CB(s, flt_http_reply(s, txn->status, chunk));
co_inject(res->chn, chunk->str, chunk->len);
/* "eat" the request */
- bi_fast_delete(req->chn->buf, req->sov);
+ b_del(req->chn->buf, req->sov);
req->next -= req->sov;
req->sov = 0;
s->req.analysers = AN_REQ_HTTP_XFER_BODY | (s->req.analysers & AN_REQ_FLT_END);