diff --git a/include/common/buffer.h b/include/common/buffer.h
index 976ea02..c0fdab4 100644
--- a/include/common/buffer.h
+++ b/include/common/buffer.h
@@ -61,23 +61,6 @@
 
 /***** FIXME: OLD API BELOW *****/
 
-/* Returns non-zero if the buffer's INPUT is considered full, which means that
- * it holds at least as much INPUT data as (size - reserve). This also means
- * that data that are scheduled for output are considered as potential free
- * space, and that the reserved space is always considered as not usable. This
- * information alone cannot be used as a general purpose free space indicator.
- * However it accurately indicates that too many data were fed in the buffer
- * for an analyzer for instance. See the channel_may_recv() function for a more
- * generic function taking everything into account.
- */
-static inline int buffer_full(const struct buffer *b, unsigned int reserve)
-{
-	if (b == &buf_empty)
-		return 0;
-
-	return (b->i + reserve >= b->size);
-}
-
 /* Normalizes a pointer after a subtract */
 static inline char *buffer_wrap_sub(const struct buffer *buf, char *ptr)
 {
diff --git a/include/proto/channel.h b/include/proto/channel.h
index 850f900..18597e4 100644
--- a/include/proto/channel.h
+++ b/include/proto/channel.h
@@ -637,6 +637,24 @@
 	return chn->buf->size - reserve;
 }
 
+/* Returns non-zero if the channel's INPUT buffer's is considered full, which
+ * means that it holds at least as much INPUT data as (size - reserve). This
+ * also means that data that are scheduled for output are considered as potential
+ * free space, and that the reserved space is always considered as not usable.
+ * This information alone cannot be used as a general purpose free space indicator.
+ * However it accurately indicates that too many data were fed in the buffer
+ * for an analyzer for instance. See the channel_may_recv() function for a more
+ * generic function taking everything into account.
+ */
+static inline int channel_full(const struct channel *c, unsigned int reserve)
+{
+	if (c->buf == &buf_empty)
+		return 0;
+
+	return (b_data(c->buf) - co_data(c) + reserve >= c_size(c));
+}
+
+
 /* Returns the amount of space available at the input of the buffer, taking the
  * reserved space into account if ->to_forward indicates that an end of transfer
  * is close to happen. The test is optimized to avoid as many operations as
diff --git a/src/proto_http.c b/src/proto_http.c
index 3d83e1b..7f90373 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -1717,7 +1717,7 @@
 		 *    later, so the stream will never terminate. We
 		 *    must terminate it now.
 		 */
-		if (unlikely(buffer_full(req->buf, global.tune.maxrewrite))) {
+		if (unlikely(channel_full(req, global.tune.maxrewrite))) {
 			/* FIXME: check if URI is set and return Status
 			 * 414 Request URI too long instead.
 			 */
@@ -4177,7 +4177,7 @@
 	/* we get here if we need to wait for more data. If the buffer is full,
 	 * we have the maximum we can expect.
 	 */
-	if (buffer_full(req->buf, global.tune.maxrewrite))
+	if (channel_full(req, global.tune.maxrewrite))
 		goto http_end;
 
 	if ((req->flags & CF_READ_TIMEOUT) || tick_is_expired(req->analyse_exp, now_ms)) {
@@ -5211,7 +5211,7 @@
 		}
 
 		/* too large response does not fit in buffer. */
-		else if (buffer_full(rep->buf, global.tune.maxrewrite)) {
+		else if (channel_full(rep, global.tune.maxrewrite)) {
 			if (msg->err_pos < 0)
 				msg->err_pos = rep->buf->i;
 			goto hdr_response_bad;
@@ -9530,7 +9530,7 @@
 			/* Still no valid request ? */
 			if (unlikely(msg->msg_state < HTTP_MSG_BODY)) {
 				if ((msg->msg_state == HTTP_MSG_ERROR) ||
-				    buffer_full(s->req.buf, global.tune.maxrewrite)) {
+				    channel_full(&s->req, global.tune.maxrewrite)) {
 					return 0;
 				}
 				/* wait for final state */
diff --git a/src/tcp_rules.c b/src/tcp_rules.c
index deb34ac..e21c5b7 100644
--- a/src/tcp_rules.c
+++ b/src/tcp_rules.c
@@ -122,7 +122,7 @@
 	 * - if one rule returns KO, then return KO
 	 */
 
-	if ((req->flags & CF_SHUTR) || buffer_full(req->buf, global.tune.maxrewrite) ||
+	if ((req->flags & CF_SHUTR) || channel_full(req, global.tune.maxrewrite) ||
 	    !s->be->tcp_req.inspect_delay || tick_is_expired(req->analyse_exp, now_ms))
 		partial = SMP_OPT_FINAL;
 	else
