MINOR: buffer: make b_getblk_nc() take const pointers

Now that there are no more users requiring to modify the buffer anymore,
switch these ones to const char and const buffer. This will make it more
obvious next time send functions are tempted to modify the buffer's output
count. Minor adaptations were necessary at a few call places which were
using char due to the function's previous prototype.
diff --git a/include/common/buf.h b/include/common/buf.h
index be196f1..488c406 100644
--- a/include/common/buf.h
+++ b/include/common/buf.h
@@ -352,7 +352,7 @@
  *   =0 : not enough data available. <blk*> are left undefined.
  * The buffer is left unaffected. Unused buffers are left in an undefined state.
  */
-static inline size_t b_getblk_nc(struct buffer *buf, char **blk1, int *len1, char **blk2, int *len2, size_t ofs, size_t max)
+static inline size_t b_getblk_nc(const struct buffer *buf, const char **blk1, int *len1, const char **blk2, int *len2, size_t ofs, size_t max)
 {
 	size_t l1;
 
diff --git a/include/proto/channel.h b/include/proto/channel.h
index fdbcc94..eedeaae 100644
--- a/include/proto/channel.h
+++ b/include/proto/channel.h
@@ -53,8 +53,8 @@
 int co_inject(struct channel *chn, const char *msg, int len);
 int co_getline(const struct channel *chn, char *str, int len);
 int co_getblk(const struct channel *chn, char *blk, int len, int offset);
-int co_getline_nc(const struct channel *chn, char **blk1, int *len1, char **blk2, int *len2);
-int co_getblk_nc(const struct channel *chn, char **blk1, int *len1, char **blk2, int *len2);
+int co_getline_nc(const struct channel *chn, const char **blk1, int *len1, const char **blk2, int *len2);
+int co_getblk_nc(const struct channel *chn, const char **blk1, int *len1, const char **blk2, int *len2);
 
 
 /* returns a pointer to the stream the channel belongs to */
diff --git a/src/channel.c b/src/channel.c
index b720024..3b0592f 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -312,7 +312,7 @@
  * The channel status is not changed. The caller must call co_skip() to
  * update it. Unused buffers are left in an undefined state.
  */
-int co_getblk_nc(const struct channel *chn, char **blk1, int *len1, char **blk2, int *len2)
+int co_getblk_nc(const struct channel *chn, const char **blk1, int *len1, const char **blk2, int *len2)
 {
 	if (unlikely(chn->buf->o == 0)) {
 		if (chn->flags & CF_SHUTW)
@@ -333,8 +333,8 @@
  * the '\n'. Unused buffers are left in an undefined state.
  */
 int co_getline_nc(const struct channel *chn,
-                  char **blk1, int *len1,
-                  char **blk2, int *len2)
+                  const char **blk1, int *len1,
+                  const char **blk2, int *len2)
 {
 	int retcode;
 	int l;
diff --git a/src/hlua.c b/src/hlua.c
index 967f05e..eb27ebc 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -1738,9 +1738,9 @@
 	struct appctx *appctx;
 	int len;
 	int nblk;
-	char *blk1;
+	const char *blk1;
 	int len1;
-	char *blk2;
+	const char *blk2;
 	int len2;
 	int skip_at_end = 0;
 	struct channel *oc;
@@ -3633,9 +3633,9 @@
 	struct hlua_appctx *appctx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
 	struct stream_interface *si = appctx->appctx->owner;
 	int ret;
-	char *blk1;
+	const char *blk1;
 	int len1;
-	char *blk2;
+	const char *blk2;
 	int len2;
 
 	/* Read the maximum amount of data avalaible. */
@@ -3688,9 +3688,9 @@
 	struct stream_interface *si = appctx->appctx->owner;
 	int len = MAY_LJMP(luaL_checkinteger(L, 2));
 	int ret;
-	char *blk1;
+	const char *blk1;
 	int len1;
-	char *blk2;
+	const char *blk2;
 	int len2;
 
 	/* Read the maximum amount of data avalaible. */
@@ -4096,9 +4096,9 @@
 	struct stream_interface *si = appctx->appctx->owner;
 	struct channel *chn = si_ic(si);
 	int ret;
-	char *blk1;
+	const char *blk1;
 	int len1;
-	char *blk2;
+	const char *blk2;
 	int len2;
 
 	/* Maybe we cant send a 100-continue ? */
@@ -4182,9 +4182,9 @@
 	int len = MAY_LJMP(luaL_checkinteger(L, 2));
 	struct channel *chn = si_ic(si);
 	int ret;
-	char *blk1;
+	const char *blk1;
 	int len1;
-	char *blk2;
+	const char *blk2;
 	int len2;
 
 	/* Maybe we cant send a 100-continue ? */
@@ -6626,9 +6626,9 @@
 	struct act_rule *rule = ctx->rule;
 	struct proxy *px = strm->be;
 	struct hlua *hlua = ctx->ctx.hlua_apphttp.hlua;
-	char *blk1;
+	const char *blk1;
 	int len1;
-	char *blk2;
+	const char *blk2;
 	int len2;
 	int ret;
 
diff --git a/src/mux_h2.c b/src/mux_h2.c
index ce39aea..ec5554b 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -2945,7 +2945,7 @@
  * number of bytes sent. The caller must check the stream's status to detect
  * any error which might have happened subsequently to a successful send.
  */
-static size_t h2s_frt_make_resp_headers(struct h2s *h2s, struct buffer *buf, size_t ofs, size_t max)
+static size_t h2s_frt_make_resp_headers(struct h2s *h2s, const struct buffer *buf, size_t ofs, size_t max)
 {
 	struct http_hdr list[MAX_HTTP_HDR];
 	struct h2c *h2c = h2s->h2c;
@@ -3118,7 +3118,7 @@
  * the number of bytes sent. The caller must check the stream's status to
  * detect any error which might have happened subsequently to a successful send.
  */
-static size_t h2s_frt_make_resp_data(struct h2s *h2s, struct buffer *buf, size_t ofs, size_t max)
+static size_t h2s_frt_make_resp_data(struct h2s *h2s, const struct buffer *buf, size_t ofs, size_t max)
 {
 	struct h2c *h2c = h2s->h2c;
 	struct h1m *h1m = &h2s->res;
@@ -3127,7 +3127,7 @@
 	size_t total = 0;
 	int es_now = 0;
 	int size = 0;
-	char *blk1, *blk2;
+	const char *blk1, *blk2;
 	int len1, len2;
 
 	if (h2c_mux_busy(h2c, h2s)) {