]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: proto_htx: Move HTX analyzers & co to http_ana.{c,h} files
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jul 2019 12:54:53 +0000 (14:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:24:12 +0000 (09:24 +0200)
The old module proto_http does not exist anymore. All code dedicated to the HTTP
analysis is now grouped in the file proto_htx.c. So, to finish the polishing
after removing the legacy HTTP code, proto_htx.{c,h} files have been moved in
http_ana.{c,h} files.

In addition, all HTX analyzers and related functions prefixed with "htx_" have
been renamed to start with "http_" instead.

34 files changed:
Makefile
contrib/debug/flags.c
include/proto/filters.h
include/proto/http_ana.h [moved from include/proto/proto_http.h with 52% similarity]
include/types/hlua.h
include/types/http_ana.h [moved from include/types/proto_http.h with 99% similarity]
include/types/stream.h
src/51d.c
src/backend.c
src/cache.c
src/cfgparse.c
src/da.c
src/dns.c
src/filters.c
src/flt_http_comp.c
src/flt_spoe.c
src/flt_trace.c
src/frontend.c
src/haproxy.c
src/hlua.c
src/http_act.c
src/http_ana.c [moved from src/proto_htx.c with 93% similarity]
src/http_fetch.c
src/http_rules.c
src/payload.c
src/proto_http.c [deleted file]
src/proto_tcp.c
src/proxy.c
src/queue.c
src/ssl_sock.c
src/stick_table.c
src/stream.c
src/vars.c
src/wurfl.c

index 950cee58e4c513b083f82028b1bd8b6777612154..419d3ea1e42dc645c81dcfd644089469c11985e6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -756,7 +756,7 @@ all: haproxy $(EXTRA)
 endif
 endif
 
-OBJS = src/proto_http.o src/cfgparse-listen.o src/proto_htx.o src/stream.o    \
+OBJS = src/http_ana.o src/cfgparse-listen.o src/stream.o                      \
        src/mux_h2.o src/stats.o src/flt_spoe.o src/server.o src/checks.o      \
        src/haproxy.o src/cfgparse.o src/flt_http_comp.o src/http_fetch.o      \
        src/dns.o src/stick_table.o src/mux_h1.o src/peers.o src/standard.o    \
index 0e67155a8a2b1640809052e75d0bd070cda0327f..1a17c7fefd994fbad0c245baf5baa319be4879d5 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <types/channel.h>
 #include <types/connection.h>
-#include <types/proto_http.h>
+#include <types/http_ana.h>
 #include <types/stream.h>
 #include <types/stream_interface.h>
 #include <types/task.h>
index 256270f98cfa3800ff51be443818b1ce4771e732..3deb2d1170de3d637af1fad8e2b1216efec5190f 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <types/channel.h>
 #include <types/filters.h>
-#include <types/proto_http.h>
+#include <types/http_ana.h>
 #include <types/proxy.h>
 #include <types/stream.h>
 
similarity index 52%
rename from include/proto/proto_http.h
rename to include/proto/http_ana.h
index ea8932c6adc1ef3c5a8df4678febaf428a0b571e..66895f479f39de0fd2e38ed53fb1e1aadb3c8cfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/proto_http.h
+ * include/proto/http_ana.h
  * This file contains HTTP protocol definitions.
  *
  * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
 #include <common/config.h>
 #include <common/htx.h>
 #include <types/channel.h>
-#include <types/proto_http.h>
+#include <types/http_ana.h>
 #include <types/stream.h>
 
 extern struct pool_head *pool_head_uniqueid;
 
-int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit);
-int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, struct proxy *px);
-int htx_process_request(struct stream *s, struct channel *req, int an_bit);
-int htx_process_tarpit(struct stream *s, struct channel *req, int an_bit);
-int htx_wait_for_request_body(struct stream *s, struct channel *req, int an_bit);
-int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit);
-int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, struct proxy *px);
-int htx_request_forward_body(struct stream *s, struct channel *req, int an_bit);
-int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit);
-int htx_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct http_txn *txn);
-int htx_transform_header_str(struct stream* s, struct channel *chn, struct htx *htx,
-                            struct ist name, const char *str, struct my_regex *re, int action);
-int htx_req_replace_stline(int action, const char *replace, int len,
-                          struct proxy *px, struct stream *s);
-void htx_res_set_status(unsigned int status, const char *reason, struct stream *s);
-void htx_check_request_for_cacheability(struct stream *s, struct channel *req);
-void htx_check_response_for_cacheability(struct stream *s, struct channel *res);
-int htx_send_name_header(struct stream *s, struct proxy *be, const char *srv_name);
-void htx_perform_server_redirect(struct stream *s, struct stream_interface *si);
-void htx_server_error(struct stream *s, struct stream_interface *si, int err, int finst, const struct buffer *msg);
-void htx_reply_and_close(struct stream *s, short status, struct buffer *msg);
-void htx_return_srv_error(struct stream *s, struct stream_interface *si);
-struct buffer *htx_error_message(struct stream *s);
+int http_wait_for_request(struct stream *s, struct channel *req, int an_bit);
+int http_process_req_common(struct stream *s, struct channel *req, int an_bit, struct proxy *px);
+int http_process_request(struct stream *s, struct channel *req, int an_bit);
+int http_process_tarpit(struct stream *s, struct channel *req, int an_bit);
+int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit);
+int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit);
+int http_process_res_common(struct stream *s, struct channel *rep, int an_bit, struct proxy *px);
+int http_request_forward_body(struct stream *s, struct channel *req, int an_bit);
+int http_response_forward_body(struct stream *s, struct channel *res, int an_bit);
+int http_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct http_txn *txn);
+int http_transform_header_str(struct stream* s, struct channel *chn, struct htx *htx,
+                             struct ist name, const char *str, struct my_regex *re, int action);
+int http_req_replace_stline(int action, const char *replace, int len,
+                           struct proxy *px, struct stream *s);
+void http_res_set_status(unsigned int status, const char *reason, struct stream *s);
+void http_check_request_for_cacheability(struct stream *s, struct channel *req);
+void http_check_response_for_cacheability(struct stream *s, struct channel *res);
+int http_send_name_header(struct stream *s, struct proxy *be, const char *srv_name);
+void http_perform_server_redirect(struct stream *s, struct stream_interface *si);
+void http_server_error(struct stream *s, struct stream_interface *si, int err, int finst, const struct buffer *msg);
+void http_reply_and_close(struct stream *s, short status, struct buffer *msg);
+void http_return_srv_error(struct stream *s, struct stream_interface *si);
+struct buffer *http_error_message(struct stream *s);
 
 struct http_txn *http_alloc_txn(struct stream *s);
 void http_init_txn(struct stream *s);
index 70c76852945b867e828ec6de43d45a354b2aca32..6a782922738c6293759de931d0c7333e8fbb4927 100644 (file)
@@ -9,7 +9,7 @@
 #include <common/regex.h>
 #include <common/xref.h>
 
-#include <types/proto_http.h>
+#include <types/http_ana.h>
 #include <types/proxy.h>
 #include <types/server.h>
 #include <types/stick_table.h>
similarity index 99%
rename from include/types/proto_http.h
rename to include/types/http_ana.h
index 5125879aa52e7241318d9bdb6fb8ee86440f50fc..417372520338f49f271fd759939d840465adc854 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/proto_http.h
+ * include/types/http_ana.h
  * This file contains HTTP protocol definitions.
  *
  * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
index 114b70aed0ba768a1bb8e840e805af1aede4970e..c8893454570b1f21dcd38b26180e571dadc2a247 100644 (file)
@@ -35,7 +35,7 @@
 #include <types/filters.h>
 #include <types/hlua.h>
 #include <types/obj_type.h>
-#include <types/proto_http.h>
+#include <types/http_ana.h>
 #include <types/proxy.h>
 #include <types/queue.h>
 #include <types/server.h>
index 852c5749b6f9fa61bb90049753f15f742fbe424d..96bbb66395835b90a9a404770bfb4822c0aedf44 100644 (file)
--- a/src/51d.c
+++ b/src/51d.c
@@ -11,7 +11,7 @@
 #include <proto/http_fetch.h>
 #include <proto/http_htx.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 #include <import/xxhash.h>
 #include <import/lru.h>
index f07a19808f6c2e119f92de05a38b6f313b9460c1..169481c4615df3edb3e4757009e3e51fc1cc9c09 100644 (file)
@@ -48,7 +48,7 @@
 #include <proto/obj_type.h>
 #include <proto/payload.h>
 #include <proto/protocol.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proto_tcp.h>
 #include <proto/proxy.h>
 #include <proto/queue.h>
index 032c9801e0a1299665e6fd524ac6aed92ee3af15..ccbbe520963e7e14a828b20d36d3da3f741ae140 100644 (file)
@@ -25,7 +25,7 @@
 #include <proto/http_htx.h>
 #include <proto/filters.h>
 #include <proto/http_rules.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/log.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
@@ -596,7 +596,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
        if (http_find_header(htx, ist("Vary"), &ctx, 0))
                goto out;
 
-       htx_check_response_for_cacheability(s, &s->res);
+       http_check_response_for_cacheability(s, &s->res);
 
        if (!(txn->flags & TX_CACHEABLE) || !(txn->flags & TX_CACHE_COOK))
                goto out;
@@ -1089,7 +1089,7 @@ enum act_return http_action_req_cache_use(struct act_rule *rule, struct proxy *p
            (txn->meth != HTTP_METH_GET && txn->meth != HTTP_METH_HEAD))
                txn->flags |= TX_CACHE_IGNORE;
 
-       htx_check_request_for_cacheability(s, &s->req);
+       http_check_request_for_cacheability(s, &s->req);
 
        if ((s->txn->flags & (TX_CACHE_IGNORE|TX_CACHEABLE)) == TX_CACHE_IGNORE)
                return ACT_RET_CONT;
index 11cb0c14e2409af3e22f676b17cb1018d6a3c539..cb3279ae50ad5fb100533df635bc5f9595a6f64b 100644 (file)
@@ -72,7 +72,7 @@
 #include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/protocol.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/peers.h>
 #include <proto/sample.h>
index 2b4ac2879e74efd75179b85e94452071b797d02a..0984c3049482c1c9533ba3ae2587e1baed0c2b4c 100644 (file)
--- a/src/da.c
+++ b/src/da.c
@@ -9,7 +9,7 @@
 #include <proto/http_fetch.h>
 #include <proto/http_htx.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 #include <dac.h>
 
index 503eb674bcbfc6a94add3ca395251d25f6b264cb..d59e96ef2251b117ad556efb21b49752a816bfc7 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -39,7 +39,7 @@
 #include <proto/checks.h>
 #include <proto/dns.h>
 #include <proto/fd.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/http_rules.h>
 #include <proto/log.h>
 #include <proto/sample.h>
index c68319b5a548a8a0727ae118d56af68d1d8bd62f..0119205aef038ce0e7b73a14dad77f9315dfcf63 100644 (file)
 #include <common/hathreads.h>
 
 #include <types/filters.h>
-#include <types/proto_http.h>
+#include <types/http_ana.h>
 
 #include <proto/compression.h>
 #include <proto/filters.h>
 #include <proto/flt_http_comp.h>
 #include <proto/http_htx.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 
@@ -1014,10 +1014,10 @@ handle_analyzer_result(struct stream *s, struct channel *chn,
        if (IS_HTX_STRM(s)) {
                /* Do not do that when we are waiting for the next request */
                if (s->txn->status)
-                       htx_reply_and_close(s, s->txn->status, NULL);
+                       http_reply_and_close(s, s->txn->status, NULL);
                else {
                        s->txn->status = 400;
-                       htx_reply_and_close(s, 400, htx_error_message(s));
+                       http_reply_and_close(s, 400, http_error_message(s));
                }
        }
 
index 446e3c379d8de0a71f9b9ab9c223755a5cb3f109..91138d6af35ebad8268bdaf6313b1414e73396fe 100644 (file)
@@ -25,7 +25,7 @@
 #include <proto/compression.h>
 #include <proto/filters.h>
 #include <proto/http_htx.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 #include <proto/stream.h>
 
index 4e48aa95c6cc27b9715c3e6226205e0b086f55f7..b8323f60c6be32158774483f59bb04fed990bb22 100644 (file)
@@ -34,7 +34,7 @@
 #include <proto/frontend.h>
 #include <proto/http_rules.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
 #include <proto/session.h>
index 4d53bfc5dd04e78f7b56b955846d060472e1f442..1ef72310dae91296490b61ddc1abceebd30078fe 100644 (file)
@@ -28,7 +28,7 @@
 #include <proto/filters.h>
 #include <proto/http_htx.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/stream.h>
 
 const char *trace_flt_id = "trace filter";
index f560c16b48e9b8d00054f08c42b81055fbfebbd5..47a9b1dee221356226e7ce8b8f048b39de30da8b 100644 (file)
@@ -39,7 +39,7 @@
 #include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/proto_tcp.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
 #include <proto/stream.h>
index e1b56e0838204bd8563db0318fb60bcc7469417e..4e24ca3b6985fd66a7ebfbf91dcc640dc3ffa103 100644 (file)
 #include <proto/mworker.h>
 #include <proto/pattern.h>
 #include <proto/protocol.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/queue.h>
 #include <proto/server.h>
index 78c6235128908a4ff6a8bb09dfb907b2e0b74ecc..aca3cc9eaceccc937a3ef9e651281203b420bcd3 100644 (file)
@@ -52,7 +52,7 @@
 #include <proto/queue.h>
 #include <proto/pattern.h>
 #include <proto/payload.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 #include <proto/server.h>
 #include <proto/session.h>
@@ -4831,7 +4831,7 @@ __LJMP static inline int hlua_http_rep_hdr(lua_State *L, struct hlua_txn *htxn,
                WILL_LJMP(luaL_argerror(L, 3, "invalid regex"));
 
        htx = htxbuf(&msg->chn->buf);
-       htx_transform_header_str(htxn->s, msg->chn, htx, ist2(name, name_len), value, re, action);
+       http_transform_header_str(htxn->s, msg->chn, htx, ist2(name, name_len), value, re, action);
        regex_free(re);
        return 0;
 }
@@ -4977,7 +4977,7 @@ static int hlua_http_req_set_meth(lua_State *L)
        size_t name_len;
        const char *name = MAY_LJMP(luaL_checklstring(L, 2, &name_len));
 
-       lua_pushboolean(L, htx_req_replace_stline(0, name, name_len, htxn->p, htxn->s) != -1);
+       lua_pushboolean(L, http_req_replace_stline(0, name, name_len, htxn->p, htxn->s) != -1);
        return 1;
 }
 
@@ -4988,7 +4988,7 @@ static int hlua_http_req_set_path(lua_State *L)
        size_t name_len;
        const char *name = MAY_LJMP(luaL_checklstring(L, 2, &name_len));
 
-       lua_pushboolean(L, htx_req_replace_stline(1, name, name_len, htxn->p, htxn->s) != -1);
+       lua_pushboolean(L, http_req_replace_stline(1, name, name_len, htxn->p, htxn->s) != -1);
        return 1;
 }
 
@@ -5012,7 +5012,7 @@ static int hlua_http_req_set_query(lua_State *L)
        trash.data += name_len;
 
        lua_pushboolean(L,
-                       htx_req_replace_stline(2, trash.area, trash.data, htxn->p, htxn->s) != -1);
+                       http_req_replace_stline(2, trash.area, trash.data, htxn->p, htxn->s) != -1);
        return 1;
 }
 
@@ -5023,7 +5023,7 @@ static int hlua_http_req_set_uri(lua_State *L)
        size_t name_len;
        const char *name = MAY_LJMP(luaL_checklstring(L, 2, &name_len));
 
-       lua_pushboolean(L, htx_req_replace_stline(3, name, name_len, htxn->p, htxn->s) != -1);
+       lua_pushboolean(L, http_req_replace_stline(3, name, name_len, htxn->p, htxn->s) != -1);
        return 1;
 }
 
@@ -5034,7 +5034,7 @@ static int hlua_http_res_set_status(lua_State *L)
        unsigned int code = MAY_LJMP(luaL_checkinteger(L, 2));
        const char *reason = MAY_LJMP(luaL_optlstring(L, 3, NULL, NULL));
 
-       htx_res_set_status(code, reason, htxn->s);
+       http_res_set_status(code, reason, htxn->s);
        return 0;
 }
 
@@ -5409,7 +5409,7 @@ __LJMP static int hlua_txn_done(lua_State *L)
        oc = &htxn->s->res;
 
        if (IS_HTX_STRM(htxn->s))
-               htx_reply_and_close(htxn->s, 0, NULL);
+               http_reply_and_close(htxn->s, 0, NULL);
        else {
                channel_auto_read(ic);
                channel_abort(ic);
index 495ba55b3f815ce45444d7d8f075acf0e8b062f6..d6015d3624683dff6362e310a2f77761a23cfebf 100644 (file)
@@ -34,7 +34,7 @@
 #include <proto/http_rules.h>
 #include <proto/http_htx.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/stream_interface.h>
 
 
@@ -62,8 +62,8 @@ static enum act_return http_action_set_req_line(struct act_rule *rule, struct pr
                                       replace->size - replace->data,
                                       &rule->arg.http.logfmt);
 
-       htx_req_replace_stline(rule->arg.http.action, replace->area,
-                              replace->data, px, s);
+       http_req_replace_stline(rule->arg.http.action, replace->area,
+                               replace->data, px, s);
 
        ret = ACT_RET_CONT;
 
@@ -162,7 +162,7 @@ static enum act_return http_action_replace_uri(struct act_rule *rule, struct pro
                goto leave;
 
        /* 3 is the set-uri action */
-       htx_req_replace_stline(3, output->area, len, px, s);
+       http_req_replace_stline(3, output->area, len, px, s);
 
        ret = ACT_RET_CONT;
 
@@ -215,7 +215,7 @@ static enum act_parse_ret parse_replace_uri(const char **args, int *orig_arg, st
 static enum act_return action_http_set_status(struct act_rule *rule, struct proxy *px,
                                               struct session *sess, struct stream *s, int flags)
 {
-       htx_res_set_status(rule->arg.status.code, rule->arg.status.reason, s);
+       http_res_set_status(rule->arg.status.code, rule->arg.status.reason, s);
        return ACT_RET_CONT;
 }
 
similarity index 93%
rename from src/proto_htx.c
rename to src/http_ana.c
index a63efffa006a47af695a8392eb4ffc4b6c5c7991..fc03751b10144f5487130ec280320d96d396e6fe 100644 (file)
@@ -27,7 +27,7 @@
 #include <proto/http_htx.h>
 #include <proto/log.h>
 #include <proto/pattern.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
 #include <proto/stream.h>
@@ -41,31 +41,31 @@ struct pool_head *pool_head_requri = NULL;
 struct pool_head *pool_head_capture = NULL;
 
 
-static void htx_end_request(struct stream *s);
-static void htx_end_response(struct stream *s);
+static void http_end_request(struct stream *s);
+static void http_end_response(struct stream *s);
 
-static void htx_capture_headers(struct htx *htx, char **cap, struct cap_hdr *cap_hdr);
-static int htx_del_hdr_value(char *start, char *end, char **from, char *next);
-static size_t htx_fmt_req_line(const struct htx_sl *sl, char *str, size_t len);
-static size_t htx_fmt_res_line(const struct htx_sl *sl, char *str, size_t len);
-static void htx_debug_stline(const char *dir, struct stream *s, const struct htx_sl *sl);
-static void htx_debug_hdr(const char *dir, struct stream *s, const struct ist n, const struct ist v);
+static void http_capture_headers(struct htx *htx, char **cap, struct cap_hdr *cap_hdr);
+static int http_del_hdr_value(char *start, char *end, char **from, char *next);
+static size_t http_fmt_req_line(const struct htx_sl *sl, char *str, size_t len);
+static size_t http_fmt_res_line(const struct htx_sl *sl, char *str, size_t len);
+static void http_debug_stline(const char *dir, struct stream *s, const struct htx_sl *sl);
+static void http_debug_hdr(const char *dir, struct stream *s, const struct ist n, const struct ist v);
 
-static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s, int *deny_status);
-static enum rule_result htx_res_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s);
+static enum rule_result http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s, int *deny_status);
+static enum rule_result http_res_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s);
 
-static int htx_apply_filters_to_request(struct stream *s, struct channel *req, struct proxy *px);
-static int htx_apply_filters_to_response(struct stream *s, struct channel *res, struct proxy *px);
+static int http_apply_filters_to_request(struct stream *s, struct channel *req, struct proxy *px);
+static int http_apply_filters_to_response(struct stream *s, struct channel *res, struct proxy *px);
 
-static void htx_manage_client_side_cookies(struct stream *s, struct channel *req);
-static void htx_manage_server_side_cookies(struct stream *s, struct channel *res);
+static void http_manage_client_side_cookies(struct stream *s, struct channel *req);
+static void http_manage_server_side_cookies(struct stream *s, struct channel *res);
 
-static int htx_stats_check_uri(struct stream *s, struct http_txn *txn, struct proxy *backend);
-static int htx_handle_stats(struct stream *s, struct channel *req);
+static int http_stats_check_uri(struct stream *s, struct http_txn *txn, struct proxy *backend);
+static int http_handle_stats(struct stream *s, struct channel *req);
 
-static int htx_handle_expect_hdr(struct stream *s, struct htx *htx, struct http_msg *msg);
-static int htx_reply_100_continue(struct stream *s);
-static int htx_reply_40x_unauthorized(struct stream *s, const char *auth_realm);
+static int http_handle_expect_hdr(struct stream *s, struct htx *htx, struct http_msg *msg);
+static int http_reply_100_continue(struct stream *s);
+static int http_reply_40x_unauthorized(struct stream *s, const char *auth_realm);
 
 /* This stream analyser waits for a complete HTTP request. It returns 1 if the
  * processing can continue on next analysers, or zero if it either needs more
@@ -74,7 +74,7 @@ static int htx_reply_40x_unauthorized(struct stream *s, const char *auth_realm);
  * when it has nothing left to do, and may remove any analyser when it wants to
  * abort.
  */
-int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
+int http_wait_for_request(struct stream *s, struct channel *req, int an_bit)
 {
 
        /*
@@ -110,7 +110,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
        }
 
        /* we're speaking HTTP here, so let's speak HTTP to the client */
-       s->srv_error = htx_return_srv_error;
+       s->srv_error = http_return_srv_error;
 
        /* If there is data available for analysis, log the end of the idle time. */
        if (c_data(req) && s->logs.t_idle == -1) {
@@ -161,7 +161,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        txn->status = 400;
                        msg->err_state = msg->msg_state;
                        msg->msg_state = HTTP_MSG_ERROR;
-                       htx_reply_and_close(s, txn->status, NULL);
+                       http_reply_and_close(s, txn->status, NULL);
                        req->analysers &= AN_REQ_FLT_END;
 
                        if (!(s->flags & SF_FINST_MASK))
@@ -190,7 +190,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        txn->status = 408;
                        msg->err_state = msg->msg_state;
                        msg->msg_state = HTTP_MSG_ERROR;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
                        req->analysers &= AN_REQ_FLT_END;
 
                        if (!(s->flags & SF_FINST_MASK))
@@ -219,7 +219,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        txn->status = 400;
                        msg->err_state = msg->msg_state;
                        msg->msg_state = HTTP_MSG_ERROR;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
                        req->analysers &= AN_REQ_FLT_END;
 
                        if (!(s->flags & SF_FINST_MASK))
@@ -271,7 +271,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                s->logs.logwait = 0;
                s->logs.level = 0;
                s->res.flags &= ~CF_EXPECT_MORE; /* speed up sending a previous response */
-               htx_reply_and_close(s, txn->status, NULL);
+               http_reply_and_close(s, txn->status, NULL);
                return 0;
        }
 
@@ -291,7 +291,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                     (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {
                int32_t pos;
 
-               htx_debug_stline("clireq", s, sl);
+               http_debug_stline("clireq", s, sl);
 
                for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
                        struct htx_blk *blk = htx_get_blk(htx, pos);
@@ -302,9 +302,9 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        if (type != HTX_BLK_HDR)
                                continue;
 
-                       htx_debug_hdr("clihdr", s,
-                                 htx_get_blk_name(htx, blk),
-                                 htx_get_blk_value(htx, blk));
+                       http_debug_hdr("clihdr", s,
+                                      htx_get_blk_name(htx, blk),
+                                      htx_get_blk_value(htx, blk));
                }
        }
 
@@ -353,7 +353,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        if (ret) {
                                /* we fail this request, let's return 503 service unavail */
                                txn->status = 503;
-                               htx_reply_and_close(s, txn->status, htx_error_message(s));
+                               http_reply_and_close(s, txn->status, http_error_message(s));
                                if (!(s->flags & SF_ERR_MASK))
                                        s->flags |= SF_ERR_LOCAL; /* we don't want a real error here */
                                goto return_prx_cond;
@@ -362,7 +362,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
 
                /* nothing to fail, let's reply normally */
                txn->status = 200;
-               htx_reply_and_close(s, txn->status, htx_error_message(s));
+               http_reply_and_close(s, txn->status, http_error_message(s));
                if (!(s->flags & SF_ERR_MASK))
                        s->flags |= SF_ERR_LOCAL; /* we don't want a real error here */
                goto return_prx_cond;
@@ -378,7 +378,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                if ((txn->uri = pool_alloc(pool_head_requri)) != NULL) {
                        size_t len;
 
-                       len = htx_fmt_req_line(sl, txn->uri, global.tune.requri_len - 1);
+                       len = http_fmt_req_line(sl, txn->uri, global.tune.requri_len - 1);
                        txn->uri[len] = 0;
 
                        if (!(s->logs.logwait &= ~(LW_REQ|LW_INIT)))
@@ -403,7 +403,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
 
        /* 5: we may need to capture headers */
        if (unlikely((s->logs.logwait & LW_REQHDR) && s->req_cap))
-               htx_capture_headers(htx, s->req_cap, sess->fe->req_cap);
+               http_capture_headers(htx, s->req_cap, sess->fe->req_cap);
 
        /* we may have to wait for the request's body */
        if (s->be->options & PR_O_WREQ_BODY)
@@ -439,7 +439,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
        txn->status = 400;
        txn->req.err_state = txn->req.msg_state;
        txn->req.msg_state = HTTP_MSG_ERROR;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);
        if (sess->listener->counters)
                _HA_ATOMIC_ADD(&sess->listener->counters->failed_req, 1);
@@ -463,7 +463,7 @@ int htx_wait_for_request(struct stream *s, struct channel *req, int an_bit)
  * either needs more data or wants to immediately abort the request (eg: deny,
  * error, ...).
  */
-int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, struct proxy *px)
+int http_process_req_common(struct stream *s, struct channel *req, int an_bit, struct proxy *px)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -498,7 +498,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
 
        /* evaluate http-request rules */
        if (!LIST_ISEMPTY(&px->http_req_rules)) {
-               verdict = htx_req_get_intercept_rule(px, &px->http_req_rules, s, &deny_status);
+               verdict = http_req_get_intercept_rule(px, &px->http_req_rules, s, &deny_status);
 
                switch (verdict) {
                case HTTP_RULE_RES_YIELD: /* some data miss, call the function later. */
@@ -541,12 +541,12 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
         * by a possible reqrep, while they are processed *after* so that a
         * reqdeny can still block them. This clearly needs to change in 1.6!
         */
-       if (!s->target && htx_stats_check_uri(s, txn, px)) {
+       if (!s->target && http_stats_check_uri(s, txn, px)) {
                s->target = &http_stats_applet.obj_type;
                if (unlikely(!si_register_handler(&s->si[1], objt_applet(s->target)))) {
                        txn->status = 500;
                        s->logs.tv_request = now;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
 
                        if (!(s->flags & SF_ERR_MASK))
                                s->flags |= SF_ERR_RESOURCE;
@@ -554,8 +554,8 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
                }
 
                /* parse the whole stats request and extract the relevant information */
-               htx_handle_stats(s, req);
-               verdict = htx_req_get_intercept_rule(px, &px->uri_auth->http_req_rules, s, &deny_status);
+               http_handle_stats(s, req);
+               verdict = http_req_get_intercept_rule(px, &px->uri_auth->http_req_rules, s, &deny_status);
                /* not all actions implemented: deny, allow, auth */
 
                if (verdict == HTTP_RULE_RES_DENY) /* stats http-request deny */
@@ -567,7 +567,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
 
        /* evaluate the req* rules except reqadd */
        if (px->req_exp != NULL) {
-               if (htx_apply_filters_to_request(s, req, px) < 0)
+               if (http_apply_filters_to_request(s, req, px) < 0)
                        goto return_bad_req;
 
                if (txn->flags & TX_CLDENY)
@@ -601,7 +601,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
                if (sess->fe == s->be) /* report it if the request was intercepted by the frontend */
                        _HA_ATOMIC_ADD(&sess->fe->fe_counters.intercepted_req, 1);
 
-               if (htx_handle_expect_hdr(s, htx, msg) == -1)
+               if (http_handle_expect_hdr(s, htx, msg) == -1)
                        goto return_bad_req;
 
                if (!(s->flags & SF_ERR_MASK))      // this is not really an error but it is
@@ -631,7 +631,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
                        if (!ret)
                                continue;
                }
-               if (!htx_apply_redirect_rule(rule, s, txn))
+               if (!http_apply_redirect_rule(rule, s, txn))
                        goto return_bad_req;
                goto done;
        }
@@ -657,7 +657,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
        /* Allow cookie logging
         */
        if (s->be->cookie_name || sess->fe->capture_name)
-               htx_manage_client_side_cookies(s, req);
+               http_manage_client_side_cookies(s, req);
 
        /* When a connection is tarpitted, we use the tarpit timeout,
         * which may be the same as the connect timeout if unspecified.
@@ -691,12 +691,12 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
        /* Allow cookie logging
         */
        if (s->be->cookie_name || sess->fe->capture_name)
-               htx_manage_client_side_cookies(s, req);
+               http_manage_client_side_cookies(s, req);
 
        txn->flags |= TX_CLDENY;
        txn->status = http_err_codes[deny_status];
        s->logs.tv_request = now;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
        stream_inc_http_err_ctr(s);
        _HA_ATOMIC_ADD(&sess->fe->fe_counters.denied_req, 1);
        if (sess->fe != s->be)
@@ -709,7 +709,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
        txn->req.err_state = txn->req.msg_state;
        txn->req.msg_state = HTTP_MSG_ERROR;
        txn->status = 400;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
 
        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);
        if (sess->listener->counters)
@@ -735,7 +735,7 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st
  * needs more data, encounters an error, or wants to immediately abort the
  * request. It relies on buffers flags, and updates s->req.analysers.
  */
-int htx_process_request(struct stream *s, struct channel *req, int an_bit)
+int http_process_request(struct stream *s, struct channel *req, int an_bit)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -782,7 +782,7 @@ int htx_process_request(struct stream *s, struct channel *req, int an_bit)
                        txn->req.msg_state = HTTP_MSG_ERROR;
                        txn->status = 500;
                        req->analysers &= AN_REQ_FLT_END;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
 
                        if (!(s->flags & SF_ERR_MASK))
                                s->flags |= SF_ERR_RESOURCE;
@@ -816,7 +816,7 @@ int htx_process_request(struct stream *s, struct channel *req, int an_bit)
         * This should only be performed in the backend.
         */
        if (s->be->cookie_name || sess->fe->capture_name)
-               htx_manage_client_side_cookies(s, req);
+               http_manage_client_side_cookies(s, req);
 
        /* add unique-id if "header-unique-id" is specified */
 
@@ -972,7 +972,7 @@ int htx_process_request(struct stream *s, struct channel *req, int an_bit)
        txn->req.msg_state = HTTP_MSG_ERROR;
        txn->status = 400;
        req->analysers &= AN_REQ_FLT_END;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
 
        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);
        if (sess->listener->counters)
@@ -989,7 +989,7 @@ int htx_process_request(struct stream *s, struct channel *req, int an_bit)
  * returns zero, at the beginning because it prevents any other processing
  * from occurring, and at the end because it terminates the request.
  */
-int htx_process_tarpit(struct stream *s, struct channel *req, int an_bit)
+int http_process_tarpit(struct stream *s, struct channel *req, int an_bit)
 {
        struct http_txn *txn = s->txn;
 
@@ -1012,7 +1012,7 @@ int htx_process_tarpit(struct stream *s, struct channel *req, int an_bit)
        s->logs.t_queue = tv_ms_elapsed(&s->logs.tv_accept, &now);
 
        if (!(req->flags & CF_READ_ERROR))
-               htx_reply_and_close(s, txn->status, htx_error_message(s));
+               http_reply_and_close(s, txn->status, http_error_message(s));
 
        req->analysers &= AN_REQ_FLT_END;
        req->analyse_exp = TICK_ETERNITY;
@@ -1033,7 +1033,7 @@ int htx_process_tarpit(struct stream *s, struct channel *req, int an_bit)
  * HTTP_MSG_CHK_SIZE, HTTP_MSG_DATA or HTTP_MSG_TRAILERS. It returns zero if it
  * needs to read more data, or 1 once it has completed its analysis.
  */
-int htx_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
+int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -1065,7 +1065,7 @@ int htx_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
         */
 
        if (msg->msg_state < HTTP_MSG_DATA) {
-               if (htx_handle_expect_hdr(s, htx, msg) == -1)
+               if (http_handle_expect_hdr(s, htx, msg) == -1)
                        goto return_bad_req;
        }
 
@@ -1081,7 +1081,7 @@ int htx_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
  missing_data:
        if ((req->flags & CF_READ_TIMEOUT) || tick_is_expired(req->analyse_exp, now_ms)) {
                txn->status = 408;
-               htx_reply_and_close(s, txn->status, htx_error_message(s));
+               http_reply_and_close(s, txn->status, http_error_message(s));
 
                if (!(s->flags & SF_ERR_MASK))
                        s->flags |= SF_ERR_CLITO;
@@ -1115,7 +1115,7 @@ int htx_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
        txn->req.err_state = txn->req.msg_state;
        txn->req.msg_state = HTTP_MSG_ERROR;
        txn->status = 400;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
 
        if (!(s->flags & SF_ERR_MASK))
                s->flags |= SF_ERR_PRXCOND;
@@ -1140,7 +1140,7 @@ int htx_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
  * When in MSG_DATA or MSG_TRAILERS, it will automatically forward chunk_len
  * bytes of pending data + the headers if not already done.
  */
-int htx_request_forward_body(struct stream *s, struct channel *req, int an_bit)
+int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -1173,8 +1173,8 @@ int htx_request_forward_body(struct stream *s, struct channel *req, int an_bit)
                        return 0;
                msg->err_state = msg->msg_state;
                msg->msg_state = HTTP_MSG_ERROR;
-               htx_end_request(s);
-               htx_end_response(s);
+               http_end_request(s);
+               http_end_response(s);
                return 1;
        }
 
@@ -1256,9 +1256,9 @@ int htx_request_forward_body(struct stream *s, struct channel *req, int an_bit)
                }
        }
 
-       htx_end_request(s);
+       http_end_request(s);
        if (!(req->analysers & an_bit)) {
-               htx_end_response(s);
+               http_end_response(s);
                if (unlikely(msg->msg_state == HTTP_MSG_ERROR)) {
                        if (req->flags & CF_SHUTW) {
                                /* request errors are most likely due to the
@@ -1359,10 +1359,10 @@ int htx_request_forward_body(struct stream *s, struct channel *req, int an_bit)
        txn->req.msg_state = HTTP_MSG_ERROR;
        if (txn->status > 0) {
                /* Note: we don't send any error if some data were already sent */
-               htx_reply_and_close(s, txn->status, NULL);
+               http_reply_and_close(s, txn->status, NULL);
        } else {
                txn->status = status;
-               htx_reply_and_close(s, txn->status, htx_error_message(s));
+               http_reply_and_close(s, txn->status, http_error_message(s));
        }
        req->analysers   &= AN_REQ_FLT_END;
        s->res.analysers &= AN_RES_FLT_END; /* we're in data phase, we want to abort both directions */
@@ -1421,7 +1421,7 @@ static __inline int do_l7_retry(struct stream *s, struct stream_interface *si)
  * when it has nothing left to do, and may remove any analyser when it wants to
  * abort.
  */
-int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
+int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
 {
        /*
         * We will analyze a complete HTTP response to check the its syntax.
@@ -1511,7 +1511,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                        }
 
                        s->si[1].flags |= SI_FL_NOLINGER;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
 
                        if (!(s->flags & SF_ERR_MASK))
                                s->flags |= SF_ERR_SRVCL;
@@ -1536,7 +1536,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                        rep->analysers &= AN_RES_FLT_END;
                        txn->status = 504;
                        s->si[1].flags |= SI_FL_NOLINGER;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
 
                        if (!(s->flags & SF_ERR_MASK))
                                s->flags |= SF_ERR_SRVTO;
@@ -1554,7 +1554,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
 
                        rep->analysers &= AN_RES_FLT_END;
                        txn->status = 400;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
 
                        if (!(s->flags & SF_ERR_MASK))
                                s->flags |= SF_ERR_CLICL;
@@ -1585,7 +1585,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                        rep->analysers &= AN_RES_FLT_END;
                        txn->status = 502;
                        s->si[1].flags |= SI_FL_NOLINGER;
-                       htx_reply_and_close(s, txn->status, htx_error_message(s));
+                       http_reply_and_close(s, txn->status, http_error_message(s));
 
                        if (!(s->flags & SF_ERR_MASK))
                                s->flags |= SF_ERR_SRVCL;
@@ -1630,7 +1630,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                     (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {
                int32_t pos;
 
-               htx_debug_stline("srvrep", s, sl);
+               http_debug_stline("srvrep", s, sl);
 
                for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
                        struct htx_blk *blk = htx_get_blk(htx, pos);
@@ -1641,9 +1641,9 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                        if (type != HTX_BLK_HDR)
                                continue;
 
-                       htx_debug_hdr("srvhdr", s,
-                                 htx_get_blk_name(htx, blk),
-                                 htx_get_blk_value(htx, blk));
+                       http_debug_hdr("srvhdr", s,
+                                      htx_get_blk_name(htx, blk),
+                                      htx_get_blk_value(htx, blk));
                }
        }
 
@@ -1738,7 +1738,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
         */
        s->logs.logwait &= ~LW_RESP;
        if (unlikely((s->logs.logwait & LW_RSPHDR) && s->res_cap))
-               htx_capture_headers(htx, s->res_cap, sess->fe->rsp_cap);
+               http_capture_headers(htx, s->res_cap, sess->fe->rsp_cap);
 
        /* Skip parsing if no content length is possible. */
        if (unlikely((txn->meth == HTTP_METH_CONNECT && txn->status == 200) ||
@@ -1802,7 +1802,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                return 0;
        txn->status = 502;
        s->si[1].flags |= SI_FL_NOLINGER;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
        rep->analysers &= AN_RES_FLT_END;
 
        if (!(s->flags & SF_ERR_MASK))
@@ -1822,7 +1822,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
        s->logs.logwait = 0;
        s->logs.level = 0;
        s->res.flags &= ~CF_EXPECT_MORE; /* speed up sending a previous response */
-       htx_reply_and_close(s, txn->status, NULL);
+       http_reply_and_close(s, txn->status, NULL);
        return 0;
 }
 
@@ -1831,7 +1831,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
  * and updates s->res.analysers. It might make sense to explode it into several
  * other functions. It works like process_request (see indications above).
  */
-int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, struct proxy *px)
+int http_process_res_common(struct stream *s, struct channel *rep, int an_bit, struct proxy *px)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -1891,7 +1891,7 @@ int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, st
 
                /* evaluate http-response rules */
                if (ret == HTTP_RULE_RES_CONT) {
-                       ret = htx_res_get_intercept_rule(cur_proxy, &cur_proxy->http_res_rules, s);
+                       ret = http_res_get_intercept_rule(cur_proxy, &cur_proxy->http_res_rules, s);
 
                        if (ret == HTTP_RULE_RES_BADREQ)
                                goto return_srv_prx_502;
@@ -1911,7 +1911,7 @@ int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, st
 
                /* try headers filters */
                if (rule_set->rsp_exp != NULL) {
-                       if (htx_apply_filters_to_response(s, rep, rule_set) < 0)
+                       if (http_apply_filters_to_response(s, rep, rule_set) < 0)
                                goto return_bad_resp;
                }
 
@@ -1969,13 +1969,13 @@ int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, st
         * Now check for a server cookie.
         */
        if (s->be->cookie_name || sess->fe->capture_name || (s->be->options & PR_O_CHK_CACHE))
-               htx_manage_server_side_cookies(s, rep);
+               http_manage_server_side_cookies(s, rep);
 
        /*
         * Check for cache-control or pragma headers if required.
         */
        if ((s->be->options & PR_O_CHK_CACHE) || (s->be->ck_opts & PR_CK_NOC))
-               htx_check_response_for_cacheability(s, rep);
+               http_check_response_for_cacheability(s, rep);
 
        /*
         * Add server cookie in the response if needed
@@ -2115,7 +2115,7 @@ int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, st
        txn->status = 502;
        s->logs.t_data = -1; /* was not a valid response */
        s->si[1].flags |= SI_FL_NOLINGER;
-       htx_reply_and_close(s, txn->status, htx_error_message(s));
+       http_reply_and_close(s, txn->status, http_error_message(s));
        if (!(s->flags & SF_ERR_MASK))
                s->flags |= SF_ERR_PRXCOND;
        if (!(s->flags & SF_FINST_MASK))
@@ -2152,7 +2152,7 @@ int htx_process_res_common(struct stream *s, struct channel *rep, int an_bit, st
  * is performed at once on final states for all bytes parsed, or when leaving
  * on missing data.
  */
-int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit)
+int http_response_forward_body(struct stream *s, struct channel *res, int an_bit)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -2178,8 +2178,8 @@ int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit)
                 */
                msg->err_state = msg->msg_state;
                msg->msg_state = HTTP_MSG_ERROR;
-               htx_end_response(s);
-               htx_end_request(s);
+               http_end_response(s);
+               http_end_request(s);
                return 1;
        }
 
@@ -2255,9 +2255,9 @@ int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit)
                }
        }
 
-       htx_end_response(s);
+       http_end_response(s);
        if (!(res->analysers & an_bit)) {
-               htx_end_request(s);
+               http_end_request(s);
                if (unlikely(msg->msg_state == HTTP_MSG_ERROR)) {
                        if (res->flags & CF_SHUTW) {
                                /* response errors are most likely due to the
@@ -2344,7 +2344,7 @@ int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit)
        txn->rsp.err_state = txn->rsp.msg_state;
        txn->rsp.msg_state = HTTP_MSG_ERROR;
        /* don't send any error message as we're in the body */
-       htx_reply_and_close(s, txn->status, NULL);
+       http_reply_and_close(s, txn->status, NULL);
        res->analysers   &= AN_RES_FLT_END;
        s->req.analysers &= AN_REQ_FLT_END; /* we're in data phase, we want to abort both directions */
        if (!(s->flags & SF_FINST_MASK))
@@ -2356,7 +2356,7 @@ int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit)
  * returns zero on success, or zero in case of a, irrecoverable error such
  * as too large a request to build a valid response.
  */
-int htx_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct http_txn *txn)
+int http_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct http_txn *txn)
 {
        struct channel *req = &s->req;
        struct channel *res = &s->res;
@@ -2592,8 +2592,8 @@ int htx_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct
        return 0;
 }
 
-int htx_transform_header_str(struct stream* s, struct channel *chn, struct htx *htx,
-                            struct ist name, const char *str, struct my_regex *re, int action)
+int http_transform_header_str(struct stream* s, struct channel *chn, struct htx *htx,
+                             struct ist name, const char *str, struct my_regex *re, int action)
 {
        struct http_hdr_ctx ctx;
        struct buffer *output = get_trash_chunk();
@@ -2613,8 +2613,8 @@ int htx_transform_header_str(struct stream* s, struct channel *chn, struct htx *
        return 0;
 }
 
-static int htx_transform_header(struct stream* s, struct channel *chn, struct htx *htx,
-                               const struct ist name, struct list *fmt, struct my_regex *re, int action)
+static int http_transform_header(struct stream* s, struct channel *chn, struct htx *htx,
+                                const struct ist name, struct list *fmt, struct my_regex *re, int action)
 {
        struct buffer *replace;
        int ret = -1;
@@ -2627,7 +2627,7 @@ static int htx_transform_header(struct stream* s, struct channel *chn, struct ht
        if (replace->data >= replace->size - 1)
                goto leave;
 
-       ret = htx_transform_header_str(s, chn, htx, name, replace->area, re, action);
+       ret = http_transform_header_str(s, chn, htx, name, replace->area, re, action);
 
   leave:
        free_trash_chunk(replace);
@@ -2638,7 +2638,7 @@ static int htx_transform_header(struct stream* s, struct channel *chn, struct ht
 /* Terminate a 103-Erly-hints response and send it to the client. It returns 0
  * on success and -1 on error. The response channel is updated accordingly.
  */
-static int htx_reply_103_early_hints(struct channel *res)
+static int http_reply_103_early_hints(struct channel *res)
 {
        struct htx *htx = htx_from_buf(&res->buf);
        size_t data;
@@ -2663,9 +2663,9 @@ static int htx_reply_103_early_hints(struct channel *res)
  * If <early_hints> is 0, it is starts a new response by adding the start
  * line. If an error occurred -1 is returned. On success 0 is returned. The
  * channel is not updated here. It must be done calling the function
- * htx_reply_103_early_hints().
+ * http_reply_103_early_hints().
  */
-static int htx_add_early_hint_header(struct stream *s, int early_hints, const struct ist name, struct list *fmt)
+static int http_add_early_hint_header(struct stream *s, int early_hints, const struct ist name, struct list *fmt)
 {
        struct channel *res = &s->res;
        struct htx *htx = htx_from_buf(&res->buf);
@@ -2712,8 +2712,8 @@ static int htx_add_early_hint_header(struct stream *s, int early_hints, const st
  * In query string case, the mark question '?' must be set at the start of the
  * string by the caller, event if the replacement query string is empty.
  */
-int htx_req_replace_stline(int action, const char *replace, int len,
-                          struct proxy *px, struct stream *s)
+int http_req_replace_stline(int action, const char *replace, int len,
+                           struct proxy *px, struct stream *s)
 {
        struct htx *htx = htxbuf(&s->req.buf);
 
@@ -2747,7 +2747,7 @@ int htx_req_replace_stline(int action, const char *replace, int len,
 /* This function replace the HTTP status code and the associated message. The
  * variable <status> contains the new status code. This function never fails.
  */
-void htx_res_set_status(unsigned int status, const char *reason, struct stream *s)
+void http_res_set_status(unsigned int status, const char *reason, struct stream *s)
 {
        struct htx *htx = htxbuf(&s->res.buf);
        char *res;
@@ -2773,8 +2773,8 @@ void htx_res_set_status(unsigned int status, const char *reason, struct stream *
  * and a deny/tarpit rule is matched, it will be filled with this rule's deny
  * status.
  */
-static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list *rules,
-                                                  struct stream *s, int *deny_status)
+static enum rule_result http_req_get_intercept_rule(struct proxy *px, struct list *rules,
+                                                   struct stream *s, int *deny_status)
 {
        struct session *sess = strm_sess(s);
        struct http_txn *txn = s->txn;
@@ -2820,7 +2820,7 @@ static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list
   resume_execution:
                if (early_hints && rule->action != ACT_HTTP_EARLY_HINT) {
                        early_hints = 0;
-                       if (htx_reply_103_early_hints(&s->res) == -1) {
+                       if (http_reply_103_early_hints(&s->res) == -1) {
                                rule_ret = HTTP_RULE_RES_BADREQ;
                                goto end;
                        }
@@ -2858,14 +2858,14 @@ static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list
                                 * increase the counter but brute force attempts will.
                                 */
                                rule_ret = HTTP_RULE_RES_ABRT;
-                               if (htx_reply_40x_unauthorized(s, auth_realm) == -1)
+                               if (http_reply_40x_unauthorized(s, auth_realm) == -1)
                                        rule_ret = HTTP_RULE_RES_BADREQ;
                                stream_inc_http_err_ctr(s);
                                goto end;
 
                        case ACT_HTTP_REDIR:
                                rule_ret = HTTP_RULE_RES_DONE;
-                               if (!htx_apply_redirect_rule(rule->arg.redir, s, txn))
+                               if (!http_apply_redirect_rule(rule->arg.redir, s, txn))
                                        rule_ret = HTTP_RULE_RES_BADREQ;
                                goto end;
 
@@ -2887,10 +2887,10 @@ static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list
 
                        case ACT_HTTP_REPLACE_HDR:
                        case ACT_HTTP_REPLACE_VAL:
-                               if (htx_transform_header(s, &s->req, htx,
-                                                        ist2(rule->arg.hdr_add.name, rule->arg.hdr_add.name_len),
-                                                        &rule->arg.hdr_add.fmt,
-                                                        rule->arg.hdr_add.re, rule->action)) {
+                               if (http_transform_header(s, &s->req, htx,
+                                                         ist2(rule->arg.hdr_add.name, rule->arg.hdr_add.name_len),
+                                                         &rule->arg.hdr_add.fmt,
+                                                         rule->arg.hdr_add.re, rule->action)) {
                                        rule_ret = HTTP_RULE_RES_BADREQ;
                                        goto end;
                                }
@@ -3059,9 +3059,9 @@ static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list
                        case ACT_HTTP_EARLY_HINT:
                                if (!(txn->req.flags & HTTP_MSGF_VER_11))
                                        break;
-                               early_hints = htx_add_early_hint_header(s, early_hints,
-                                                                       ist2(rule->arg.early_hint.name, rule->arg.early_hint.name_len),
-                                                                       &rule->arg.early_hint.fmt);
+                               early_hints = http_add_early_hint_header(s, early_hints,
+                                                                        ist2(rule->arg.early_hint.name, rule->arg.early_hint.name_len),
+                                                                        &rule->arg.early_hint.fmt);
                                if (early_hints == -1) {
                                        rule_ret = HTTP_RULE_RES_BADREQ;
                                        goto end;
@@ -3143,7 +3143,7 @@ static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list
 
   end:
        if (early_hints) {
-               if (htx_reply_103_early_hints(&s->res) == -1)
+               if (http_reply_103_early_hints(&s->res) == -1)
                        rule_ret = HTTP_RULE_RES_BADREQ;
        }
 
@@ -3161,8 +3161,8 @@ static enum rule_result htx_req_get_intercept_rule(struct proxy *px, struct list
  * deny rule. If *YIELD is returned, the caller must call again the function
  * with the same context.
  */
-static enum rule_result htx_res_get_intercept_rule(struct proxy *px, struct list *rules,
-                                                  struct stream *s)
+static enum rule_result http_res_get_intercept_rule(struct proxy *px, struct list *rules,
+                                                   struct stream *s)
 {
        struct session *sess = strm_sess(s);
        struct http_txn *txn = s->txn;
@@ -3232,10 +3232,10 @@ resume_execution:
 
                        case ACT_HTTP_REPLACE_HDR:
                        case ACT_HTTP_REPLACE_VAL:
-                               if (htx_transform_header(s, &s->res, htx,
-                                                        ist2(rule->arg.hdr_add.name, rule->arg.hdr_add.name_len),
-                                                        &rule->arg.hdr_add.fmt,
-                                                        rule->arg.hdr_add.re, rule->action)) {
+                               if (http_transform_header(s, &s->res, htx,
+                                                         ist2(rule->arg.hdr_add.name, rule->arg.hdr_add.name_len),
+                                                         &rule->arg.hdr_add.fmt,
+                                                         rule->arg.hdr_add.re, rule->action)) {
                                        rule_ret = HTTP_RULE_RES_BADREQ;
                                        goto end;
                                }
@@ -3398,7 +3398,7 @@ resume_execution:
 
                        case ACT_HTTP_REDIR:
                                rule_ret = HTTP_RULE_RES_DONE;
-                               if (!htx_apply_redirect_rule(rule->arg.redir, s, txn))
+                               if (!http_apply_redirect_rule(rule->arg.redir, s, txn))
                                        rule_ret = HTTP_RULE_RES_BADREQ;
                                goto end;
 
@@ -3500,7 +3500,7 @@ resume_execution:
  * Since it can manage the switch to another backend, it updates the per-proxy
  * DENY stats.
  */
-static int htx_apply_filter_to_req_headers(struct stream *s, struct channel *req, struct hdr_exp *exp)
+static int http_apply_filter_to_req_headers(struct stream *s, struct channel *req, struct hdr_exp *exp)
 {
        struct http_txn *txn = s->txn;
        struct htx *htx;
@@ -3596,7 +3596,7 @@ static int htx_apply_filter_to_req_headers(struct stream *s, struct channel *req
  * Since it can manage the switch to another backend, it updates the per-proxy
  * DENY stats.
  */
-static int htx_apply_filter_to_req_line(struct stream *s, struct channel *req, struct hdr_exp *exp)
+static int http_apply_filter_to_req_line(struct stream *s, struct channel *req, struct hdr_exp *exp)
 {
        struct http_txn *txn = s->txn;
        struct htx *htx;
@@ -3617,7 +3617,7 @@ static int htx_apply_filter_to_req_line(struct stream *s, struct channel *req, s
 
        done = 0;
 
-       reqline->data = htx_fmt_req_line(http_get_stline(htx), reqline->area, reqline->size);
+       reqline->data = http_fmt_req_line(http_get_stline(htx), reqline->area, reqline->size);
 
        /* Now we have the request line between cur_ptr and cur_end */
        if (regex_exec_match2(exp->preg, reqline->area, reqline->data, MAX_MATCH, pmatch, 0)) {
@@ -3663,7 +3663,7 @@ static int htx_apply_filter_to_req_line(struct stream *s, struct channel *req, s
  * unparsable request. Since it can manage the switch to another backend, it
  * updates the per-proxy DENY stats.
  */
-static int htx_apply_filters_to_request(struct stream *s, struct channel *req, struct proxy *px)
+static int http_apply_filters_to_request(struct stream *s, struct channel *req, struct proxy *px)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -3700,7 +3700,7 @@ static int htx_apply_filters_to_request(struct stream *s, struct channel *req, s
                }
 
                /* Apply the filter to the request line. */
-               ret = htx_apply_filter_to_req_line(s, req, exp);
+               ret = http_apply_filter_to_req_line(s, req, exp);
                if (unlikely(ret < 0))
                        return -1;
 
@@ -3708,7 +3708,7 @@ static int htx_apply_filters_to_request(struct stream *s, struct channel *req, s
                        /* The filter did not match the request, it can be
                         * iterated through all headers.
                         */
-                       if (unlikely(htx_apply_filter_to_req_headers(s, req, exp) < 0))
+                       if (unlikely(http_apply_filter_to_req_headers(s, req, exp) < 0))
                                return -1;
                }
        }
@@ -3718,7 +3718,7 @@ static int htx_apply_filters_to_request(struct stream *s, struct channel *req, s
 /* Iterate the same filter through all response headers contained in <res>.
  * Returns 1 if this filter can be stopped upon return, otherwise 0.
  */
-static int htx_apply_filter_to_resp_headers(struct stream *s, struct channel *res, struct hdr_exp *exp)
+static int http_apply_filter_to_resp_headers(struct stream *s, struct channel *res, struct hdr_exp *exp)
 {
        struct http_txn *txn = s->txn;
        struct htx *htx;
@@ -3809,7 +3809,7 @@ static int htx_apply_filter_to_resp_headers(struct stream *s, struct channel *re
  * Returns 0 if nothing has been done, 1 if the filter has been applied,
  * or -1 if a replacement resulted in an invalid status line.
  */
-static int htx_apply_filter_to_sts_line(struct stream *s, struct channel *res, struct hdr_exp *exp)
+static int http_apply_filter_to_sts_line(struct stream *s, struct channel *res, struct hdr_exp *exp)
 {
        struct http_txn *txn = s->txn;
        struct htx *htx;
@@ -3828,7 +3828,7 @@ static int htx_apply_filter_to_sts_line(struct stream *s, struct channel *res, s
                return 0;
 
        done = 0;
-       resline->data = htx_fmt_res_line(http_get_stline(htx), resline->area, resline->size);
+       resline->data = http_fmt_res_line(http_get_stline(htx), resline->area, resline->size);
 
        /* Now we have the status line between cur_ptr and cur_end */
        if (regex_exec_match2(exp->preg, resline->area, resline->data, MAX_MATCH, pmatch, 0)) {
@@ -3869,7 +3869,7 @@ static int htx_apply_filter_to_sts_line(struct stream *s, struct channel *res, s
  * Returns 0 if everything is alright, or -1 in case a replacement lead to an
  * unparsable response.
  */
-static int htx_apply_filters_to_response(struct stream *s, struct channel *res, struct proxy *px)
+static int http_apply_filters_to_response(struct stream *s, struct channel *res, struct proxy *px)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -3907,7 +3907,7 @@ static int htx_apply_filters_to_response(struct stream *s, struct channel *res,
                }
 
                /* Apply the filter to the status line. */
-               ret = htx_apply_filter_to_sts_line(s, res, exp);
+               ret = http_apply_filter_to_sts_line(s, res, exp);
                if (unlikely(ret < 0))
                        return -1;
 
@@ -3915,7 +3915,7 @@ static int htx_apply_filters_to_response(struct stream *s, struct channel *res,
                        /* The filter did not match the response, it can be
                         * iterated through all headers.
                         */
-                       if (unlikely(htx_apply_filter_to_resp_headers(s, res, exp) < 0))
+                       if (unlikely(http_apply_filter_to_resp_headers(s, res, exp) < 0))
                                return -1;
                }
        }
@@ -3928,7 +3928,7 @@ static int htx_apply_filters_to_response(struct stream *s, struct channel *res,
  * of the multiple very crappy and ambiguous syntaxes we have to support. it
  * highly recommended not to touch this part without a good reason !
  */
-static void htx_manage_client_side_cookies(struct stream *s, struct channel *req)
+static void http_manage_client_side_cookies(struct stream *s, struct channel *req)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -4053,7 +4053,7 @@ static void htx_manage_client_side_cookies(struct stream *s, struct channel *req
                                 */
                                preserve_hdr = 1;
                                if (del_from != NULL) {
-                                       int delta = htx_del_hdr_value(hdr_beg, hdr_end, &del_from, prev);
+                                       int delta = http_del_hdr_value(hdr_beg, hdr_end, &del_from, prev);
                                        val_end  += delta;
                                        next     += delta;
                                        hdr_end  += delta;
@@ -4283,7 +4283,7 @@ static void htx_manage_client_side_cookies(struct stream *s, struct channel *req
                                preserve_hdr = 1;
 
                                if (del_from != NULL) {
-                                       int delta = htx_del_hdr_value(hdr_beg, hdr_end, &del_from, prev);
+                                       int delta = http_del_hdr_value(hdr_beg, hdr_end, &del_from, prev);
                                        if (att_beg >= del_from)
                                                att_beg += delta;
                                        if (att_end >= del_from)
@@ -4326,7 +4326,7 @@ static void htx_manage_client_side_cookies(struct stream *s, struct channel *req
  * desirable to call it only when needed. This function is also used when we
  * just need to know if there is a cookie (eg: for check-cache).
  */
-static void htx_manage_server_side_cookies(struct stream *s, struct channel *res)
+static void http_manage_server_side_cookies(struct stream *s, struct channel *res)
 {
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
@@ -4547,7 +4547,7 @@ static void htx_manage_server_side_cookies(struct stream *s, struct channel *res
                                                 */
                                        } else {
                                                /* just remove the value */
-                                               int delta = htx_del_hdr_value(hdr_beg, hdr_end, &prev, next);
+                                               int delta = http_del_hdr_value(hdr_beg, hdr_end, &prev, next);
                                                next      = prev;
                                                hdr_end  += delta;
                                        }
@@ -4606,7 +4606,7 @@ static void htx_manage_server_side_cookies(struct stream *s, struct channel *res
  * the request may be served from the cache and/or if it is cacheable. Updates
  * s->txn->flags.
  */
-void htx_check_request_for_cacheability(struct stream *s, struct channel *req)
+void http_check_request_for_cacheability(struct stream *s, struct channel *req)
 {
        struct http_txn *txn = s->txn;
        struct htx *htx;
@@ -4692,7 +4692,7 @@ void htx_check_request_for_cacheability(struct stream *s, struct channel *req)
 /*
  * Check if response is cacheable or not. Updates s->txn->flags.
  */
-void htx_check_response_for_cacheability(struct stream *s, struct channel *res)
+void http_check_response_for_cacheability(struct stream *s, struct channel *res)
 {
        struct http_txn *txn = s->txn;
        struct htx *htx;
@@ -4774,7 +4774,7 @@ void htx_check_response_for_cacheability(struct stream *s, struct channel *res)
  * scheduled for being forwarded. This is the reason why the number of forwarded
  * bytes have to be adjusted.
  */
-int htx_send_name_header(struct stream *s, struct proxy *be, const char *srv_name)
+int http_send_name_header(struct stream *s, struct proxy *be, const char *srv_name)
 {
        struct htx *htx;
        struct http_hdr_ctx ctx;
@@ -4808,7 +4808,7 @@ int htx_send_name_header(struct stream *s, struct proxy *be, const char *srv_nam
  *
  * Returns 1 if stats should be provided, otherwise 0.
  */
-static int htx_stats_check_uri(struct stream *s, struct http_txn *txn, struct proxy *backend)
+static int http_stats_check_uri(struct stream *s, struct http_txn *txn, struct proxy *backend)
 {
        struct uri_auth *uri_auth = backend->uri_auth;
        struct htx *htx;
@@ -4843,7 +4843,7 @@ static int htx_stats_check_uri(struct stream *s, struct http_txn *txn, struct pr
  * s->target which is supposed to already point to the stats applet. The caller
  * is expected to have already assigned an appctx to the stream.
  */
-static int htx_handle_stats(struct stream *s, struct channel *req)
+static int http_handle_stats(struct stream *s, struct channel *req)
 {
        struct stats_admin_rule *stats_admin_rule;
        struct stream_interface *si = &s->si[1];
@@ -4992,7 +4992,7 @@ static int htx_handle_stats(struct stream *s, struct channel *req)
        return 1;
 }
 
-void htx_perform_server_redirect(struct stream *s, struct stream_interface *si)
+void http_perform_server_redirect(struct stream *s, struct stream_interface *si)
 {
        struct channel *req = &s->req;
        struct channel *res = &s->res;
@@ -5087,7 +5087,7 @@ void htx_perform_server_redirect(struct stream *s, struct stream_interface *si)
 /* This function terminates the request because it was completly analyzed or
  * because an error was triggered during the body forwarding.
  */
-static void htx_end_request(struct stream *s)
+static void http_end_request(struct stream *s)
 {
        struct channel *chn = &s->req;
        struct http_txn *txn = s->txn;
@@ -5221,7 +5221,7 @@ static void htx_end_request(struct stream *s)
 /* This function terminates the response because it was completly analyzed or
  * because an error was triggered during the body forwarding.
  */
-static void htx_end_response(struct stream *s)
+static void http_end_response(struct stream *s)
 {
        struct channel *chn = &s->res;
        struct http_txn *txn = s->txn;
@@ -5326,8 +5326,8 @@ static void htx_end_response(struct stream *s)
        channel_auto_read(chn);
 }
 
-void htx_server_error(struct stream *s, struct stream_interface *si, int err,
-                     int finst, const struct buffer *msg)
+void http_server_error(struct stream *s, struct stream_interface *si, int err,
+                      int finst, const struct buffer *msg)
 {
        channel_auto_read(si_oc(si));
        channel_abort(si_oc(si));
@@ -5355,7 +5355,7 @@ void htx_server_error(struct stream *s, struct stream_interface *si, int err,
                s->flags |= finst;
 }
 
-void htx_reply_and_close(struct stream *s, short status, struct buffer *msg)
+void http_reply_and_close(struct stream *s, short status, struct buffer *msg)
 {
        channel_auto_read(&s->req);
        channel_abort(&s->req);
@@ -5386,7 +5386,7 @@ void htx_reply_and_close(struct stream *s, short status, struct buffer *msg)
        channel_shutr_now(&s->res);
 }
 
-struct buffer *htx_error_message(struct stream *s)
+struct buffer *http_error_message(struct stream *s)
 {
        const int msgnum = http_get_status_idx(s->txn->status);
 
@@ -5409,7 +5409,7 @@ struct buffer *htx_error_message(struct stream *s)
  * Note that connection errors appearing on the second request of a keep-alive
  * connection are not reported since this allows the client to retry.
  */
-void htx_return_srv_error(struct stream *s, struct stream_interface *si)
+void http_return_srv_error(struct stream *s, struct stream_interface *si)
 {
        int err_type = si->err_type;
 
@@ -5417,34 +5417,34 @@ void htx_return_srv_error(struct stream *s, struct stream_interface *si)
        s->txn->status = 503;
 
        if (err_type & SI_ET_QUEUE_ABRT)
-               htx_server_error(s, si, SF_ERR_CLICL, SF_FINST_Q,
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_CLICL, SF_FINST_Q,
+                                 http_error_message(s));
        else if (err_type & SI_ET_CONN_ABRT)
-               htx_server_error(s, si, SF_ERR_CLICL, SF_FINST_C,
-                                (s->txn->flags & TX_NOT_FIRST) ? NULL :
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_CLICL, SF_FINST_C,
+                                 (s->txn->flags & TX_NOT_FIRST) ? NULL :
+                                 http_error_message(s));
        else if (err_type & SI_ET_QUEUE_TO)
-               htx_server_error(s, si, SF_ERR_SRVTO, SF_FINST_Q,
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_SRVTO, SF_FINST_Q,
+                                 http_error_message(s));
        else if (err_type & SI_ET_QUEUE_ERR)
-               htx_server_error(s, si, SF_ERR_SRVCL, SF_FINST_Q,
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_SRVCL, SF_FINST_Q,
+                                 http_error_message(s));
        else if (err_type & SI_ET_CONN_TO)
-               htx_server_error(s, si, SF_ERR_SRVTO, SF_FINST_C,
-                                (s->txn->flags & TX_NOT_FIRST) ? NULL :
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_SRVTO, SF_FINST_C,
+                                 (s->txn->flags & TX_NOT_FIRST) ? NULL :
+                                 http_error_message(s));
        else if (err_type & SI_ET_CONN_ERR)
-               htx_server_error(s, si, SF_ERR_SRVCL, SF_FINST_C,
-                                (s->flags & SF_SRV_REUSED) ? NULL :
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_SRVCL, SF_FINST_C,
+                                 (s->flags & SF_SRV_REUSED) ? NULL :
+                                 http_error_message(s));
        else if (err_type & SI_ET_CONN_RES)
-               htx_server_error(s, si, SF_ERR_RESOURCE, SF_FINST_C,
-                                (s->txn->flags & TX_NOT_FIRST) ? NULL :
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_RESOURCE, SF_FINST_C,
+                                 (s->txn->flags & TX_NOT_FIRST) ? NULL :
+                                 http_error_message(s));
        else { /* SI_ET_CONN_OTHER and others */
                s->txn->status = 500;
-               htx_server_error(s, si, SF_ERR_INTERNAL, SF_FINST_C,
-                                htx_error_message(s));
+               http_server_error(s, si, SF_ERR_INTERNAL, SF_FINST_C,
+                                 http_error_message(s));
        }
 }
 
@@ -5452,7 +5452,7 @@ void htx_return_srv_error(struct stream *s, struct stream_interface *si)
 /* Handle Expect: 100-continue for HTTP/1.1 messages if necessary. It returns 0
  * on success and -1 on error.
  */
-static int htx_handle_expect_hdr(struct stream *s, struct htx *htx, struct http_msg *msg)
+static int http_handle_expect_hdr(struct stream *s, struct htx *htx, struct http_msg *msg)
 {
        /* If we have HTTP/1.1 message with a body and Expect: 100-continue,
         * then we must send an HTTP/1.1 100 Continue intermediate response.
@@ -5466,7 +5466,7 @@ static int htx_handle_expect_hdr(struct stream *s, struct htx *htx, struct http_
                /* Expect is allowed in 1.1, look for it */
                if (http_find_header(htx, hdr, &ctx, 0) &&
                    unlikely(isteqi(ctx.value, ist2("100-continue", 12)))) {
-                       if (htx_reply_100_continue(s) == -1)
+                       if (http_reply_100_continue(s) == -1)
                                return -1;
                        http_remove_header(htx, &ctx);
                }
@@ -5477,7 +5477,7 @@ static int htx_handle_expect_hdr(struct stream *s, struct htx *htx, struct http_
 /* Send a 100-Continue response to the client. It returns 0 on success and -1
  * on error. The response channel is updated accordingly.
  */
-static int htx_reply_100_continue(struct stream *s)
+static int http_reply_100_continue(struct stream *s)
 {
        struct channel *res = &s->res;
        struct htx *htx = htx_from_buf(&res->buf);
@@ -5512,7 +5512,7 @@ static int htx_reply_100_continue(struct stream *s)
  * ont whether we use a proxy or not. It returns 0 on success and -1 on
  * error. The response channel is updated accordingly.
  */
-static int htx_reply_40x_unauthorized(struct stream *s, const char *auth_realm)
+static int http_reply_40x_unauthorized(struct stream *s, const char *auth_realm)
 {
        struct channel *res = &s->res;
        struct htx *htx = htx_from_buf(&res->buf);
@@ -5596,7 +5596,7 @@ static int htx_reply_40x_unauthorized(struct stream *s, const char *auth_realm)
  * Capture headers from message <htx> according to header list <cap_hdr>, and
  * fill the <cap> pointers appropriately.
  */
-static void htx_capture_headers(struct htx *htx, char **cap, struct cap_hdr *cap_hdr)
+static void http_capture_headers(struct htx *htx, char **cap, struct cap_hdr *cap_hdr)
 {
        struct cap_hdr *h;
        int32_t pos;
@@ -5653,7 +5653,7 @@ static void htx_capture_headers(struct htx *htx, char **cap, struct cap_hdr *cap
  *   - <next> points to a valid delimiter or <end> ;
  *   - there are non-space chars before <from>.
  */
-static int htx_del_hdr_value(char *start, char *end, char **from, char *next)
+static int http_del_hdr_value(char *start, char *end, char **from, char *next)
 {
        char *prev = *from;
 
@@ -5691,7 +5691,7 @@ static int htx_del_hdr_value(char *start, char *end, char **from, char *next)
 /* Formats the start line of the request (without CRLF) and puts it in <str> and
  * return the written length. The line can be truncated if it exceeds <len>.
  */
-static size_t htx_fmt_req_line(const struct htx_sl *sl, char *str, size_t len)
+static size_t http_fmt_req_line(const struct htx_sl *sl, char *str, size_t len)
 {
        struct ist dst = ist2(str, 0);
 
@@ -5715,7 +5715,7 @@ static size_t htx_fmt_req_line(const struct htx_sl *sl, char *str, size_t len)
 /* Formats the start line of the response (without CRLF) and puts it in <str> and
  * return the written length. The line can be truncated if it exceeds <len>.
  */
-static size_t htx_fmt_res_line(const struct htx_sl *sl, char *str, size_t len)
+static size_t http_fmt_res_line(const struct htx_sl *sl, char *str, size_t len)
 {
        struct ist dst = ist2(str, 0);
 
@@ -5740,7 +5740,7 @@ static size_t htx_fmt_res_line(const struct htx_sl *sl, char *str, size_t len)
 /*
  * Print a debug line with a start line.
  */
-static void htx_debug_stline(const char *dir, struct stream *s, const struct htx_sl *sl)
+static void http_debug_stline(const char *dir, struct stream *s, const struct htx_sl *sl)
 {
         struct session *sess = strm_sess(s);
         int max;
@@ -5771,7 +5771,7 @@ static void htx_debug_stline(const char *dir, struct stream *s, const struct htx
 /*
  * Print a debug line with a header.
  */
-static void htx_debug_hdr(const char *dir, struct stream *s, const struct ist n, const struct ist v)
+static void http_debug_hdr(const char *dir, struct stream *s, const struct ist n, const struct ist v)
 {
         struct session *sess = strm_sess(s);
         int max;
@@ -5955,7 +5955,7 @@ DECLARE_POOL(pool_head_http_txn, "http_txn", sizeof(struct http_txn));
 DECLARE_POOL(pool_head_uniqueid, "uniqueid", UNIQUEID_LEN);
 
 __attribute__((constructor))
-static void __htx_protocol_init(void)
+static void __http_protocol_init(void)
 {
 }
 
index cdf1c0e71a8e800de2f1eb3466dba5c630c52384..08e71f4b40d494387eae13f42868145a24c55673 100644 (file)
@@ -38,7 +38,7 @@
 #include <proto/http_htx.h>
 #include <proto/log.h>
 #include <proto/obj_type.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 #include <proto/stream.h>
 
index 508920020db95e17d09cda013773a1b2930eb5ae..b790c5ffe95fbf4ee0f0411678aca064b59c90fc 100644 (file)
@@ -33,7 +33,7 @@
 #include <proto/action.h>
 #include <proto/arg.h>
 #include <proto/http_rules.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 
 
index f9b5fe02a9d3897df57c7a962216e58f34259648..5665794bc92a34f827c7401dc3f9f3a82eed1986 100644 (file)
@@ -22,7 +22,7 @@
 #include <proto/pattern.h>
 #include <proto/payload.h>
 #include <proto/sample.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 
 
 /************************************************************************/
diff --git a/src/proto_http.c b/src/proto_http.c
deleted file mode 100644 (file)
index 1b4e0aa..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * HTTP protocol analyzer
- *
- * Copyright 2000-2011 Willy Tarreau <w@1wt.eu>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- */
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-#include <time.h>
-
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <common/base64.h>
-#include <common/cfgparse.h>
-#include <common/chunk.h>
-#include <common/compat.h>
-#include <common/config.h>
-#include <common/debug.h>
-#include <common/h1.h>
-#include <common/memory.h>
-#include <common/mini-clist.h>
-#include <common/standard.h>
-#include <common/ticks.h>
-#include <common/time.h>
-#include <common/uri_auth.h>
-#include <common/version.h>
-
-#include <types/capture.h>
-#include <types/cli.h>
-#include <types/filters.h>
-#include <types/global.h>
-#include <types/stats.h>
-
-#include <proto/acl.h>
-#include <proto/action.h>
-#include <proto/arg.h>
-#include <proto/auth.h>
-#include <proto/backend.h>
-#include <proto/channel.h>
-#include <proto/checks.h>
-#include <proto/cli.h>
-#include <proto/compression.h>
-#include <proto/dns.h>
-#include <proto/stats.h>
-#include <proto/fd.h>
-#include <proto/filters.h>
-#include <proto/frontend.h>
-#include <proto/log.h>
-#include <proto/hlua.h>
-#include <proto/pattern.h>
-#include <proto/proto_tcp.h>
-#include <proto/proto_http.h>
-#include <proto/proxy.h>
-#include <proto/queue.h>
-#include <proto/sample.h>
-#include <proto/server.h>
-#include <proto/session.h>
-#include <proto/stream.h>
-#include <proto/stream_interface.h>
-#include <proto/task.h>
-#include <proto/pattern.h>
-#include <proto/vars.h>
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
index 4ca6fc2392e5590478ed818cb70070a7fcb1e22b..a99febf4299cbaefbeb2f20cd661ec0dcb5753f9 100644 (file)
@@ -53,7 +53,7 @@
 #include <proto/log.h>
 #include <proto/port_range.h>
 #include <proto/protocol.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proto_tcp.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
index 3012233745fee8c7fd4618655b5377af7fbb6126..de54f0b806c9648c84be0791151631a22d05d33f 100644 (file)
@@ -44,7 +44,7 @@
 #include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/proto_tcp.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
 #include <proto/signal.h>
index f4a9453015273e82b6f34a1497db0f2b075ce7ee..1c09482f104154a722dcd22d943e9ba6ceb9a11c 100644 (file)
@@ -77,7 +77,7 @@
 #include <eb32tree.h>
 
 #include <proto/http_rules.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/queue.h>
 #include <proto/sample.h>
 #include <proto/server.h>
index 3ddacb6b5800e191d3d41d28d381d15a9bb2ca17..62b85d1431d730400a78903b2010bc3650a0241f 100644 (file)
@@ -77,7 +77,7 @@
 #include <proto/listener.h>
 #include <proto/pattern.h>
 #include <proto/proto_tcp.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/server.h>
 #include <proto/stream_interface.h>
 #include <proto/log.h>
index 4b04f18ccad5977917a784ba487bb4456a0c9ad0..746cda33d3b4d3463f6a74801d2b101af8ee29c5 100644 (file)
@@ -33,7 +33,7 @@
 #include <proto/cli.h>
 #include <proto/http_rules.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proto_tcp.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
index 918da5e9d683ff82fb54ac1934209464e46136c7..e2405511893a5986a689c1fc191cd1ac52edc887 100644 (file)
@@ -54,7 +54,7 @@
 #include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/pipe.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/proxy.h>
 #include <proto/queue.h>
 #include <proto/server.h>
@@ -2072,20 +2072,20 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
                                /* Warning! ensure that analysers are always placed in ascending order! */
                                ANALYZE    (s, req, flt_start_analyze,          ana_list, ana_back, AN_REQ_FLT_START_FE);
                                FLT_ANALYZE(s, req, tcp_inspect_request,        ana_list, ana_back, AN_REQ_INSPECT_FE);
-                               FLT_ANALYZE(s, req, htx_wait_for_request,       ana_list, ana_back, AN_REQ_WAIT_HTTP);
-                               FLT_ANALYZE(s, req, htx_wait_for_request_body,  ana_list, ana_back, AN_REQ_HTTP_BODY);
-                               FLT_ANALYZE(s, req, htx_process_req_common,     ana_list, ana_back, AN_REQ_HTTP_PROCESS_FE, sess->fe);
+                               FLT_ANALYZE(s, req, http_wait_for_request,      ana_list, ana_back, AN_REQ_WAIT_HTTP);
+                               FLT_ANALYZE(s, req, http_wait_for_request_body, ana_list, ana_back, AN_REQ_HTTP_BODY);
+                               FLT_ANALYZE(s, req, http_process_req_common,    ana_list, ana_back, AN_REQ_HTTP_PROCESS_FE, sess->fe);
                                FLT_ANALYZE(s, req, process_switching_rules,    ana_list, ana_back, AN_REQ_SWITCHING_RULES);
                                ANALYZE    (s, req, flt_start_analyze,          ana_list, ana_back, AN_REQ_FLT_START_BE);
                                FLT_ANALYZE(s, req, tcp_inspect_request,        ana_list, ana_back, AN_REQ_INSPECT_BE);
-                               FLT_ANALYZE(s, req, htx_process_req_common,     ana_list, ana_back, AN_REQ_HTTP_PROCESS_BE, s->be);
-                               FLT_ANALYZE(s, req, htx_process_tarpit,         ana_list, ana_back, AN_REQ_HTTP_TARPIT);
+                               FLT_ANALYZE(s, req, http_process_req_common,    ana_list, ana_back, AN_REQ_HTTP_PROCESS_BE, s->be);
+                               FLT_ANALYZE(s, req, http_process_tarpit,        ana_list, ana_back, AN_REQ_HTTP_TARPIT);
                                FLT_ANALYZE(s, req, process_server_rules,       ana_list, ana_back, AN_REQ_SRV_RULES);
-                               FLT_ANALYZE(s, req, htx_process_request,        ana_list, ana_back, AN_REQ_HTTP_INNER);
+                               FLT_ANALYZE(s, req, http_process_request,       ana_list, ana_back, AN_REQ_HTTP_INNER);
                                FLT_ANALYZE(s, req, tcp_persist_rdp_cookie,     ana_list, ana_back, AN_REQ_PRST_RDP_COOKIE);
                                FLT_ANALYZE(s, req, process_sticking_rules,     ana_list, ana_back, AN_REQ_STICKING_RULES);
                                ANALYZE    (s, req, flt_analyze_http_headers,   ana_list, ana_back, AN_REQ_FLT_HTTP_HDRS);
-                               ANALYZE    (s, req, htx_request_forward_body,   ana_list, ana_back, AN_REQ_HTTP_XFER_BODY);
+                               ANALYZE    (s, req, http_request_forward_body,  ana_list, ana_back, AN_REQ_HTTP_XFER_BODY);
                                ANALYZE    (s, req, pcli_wait_for_request,      ana_list, ana_back, AN_REQ_WAIT_CLI);
                                ANALYZE    (s, req, flt_xfer_data,              ana_list, ana_back, AN_REQ_FLT_XFER_DATA);
                                ANALYZE    (s, req, flt_end_analyze,            ana_list, ana_back, AN_REQ_FLT_END);
@@ -2150,11 +2150,11 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
                                ANALYZE    (s, res, flt_start_analyze,          ana_list, ana_back, AN_RES_FLT_START_FE);
                                ANALYZE    (s, res, flt_start_analyze,          ana_list, ana_back, AN_RES_FLT_START_BE);
                                FLT_ANALYZE(s, res, tcp_inspect_response,       ana_list, ana_back, AN_RES_INSPECT);
-                               FLT_ANALYZE(s, res, htx_wait_for_response,      ana_list, ana_back, AN_RES_WAIT_HTTP);
+                               FLT_ANALYZE(s, res, http_wait_for_response,     ana_list, ana_back, AN_RES_WAIT_HTTP);
                                FLT_ANALYZE(s, res, process_store_rules,        ana_list, ana_back, AN_RES_STORE_RULES);
-                               FLT_ANALYZE(s, res, htx_process_res_common,     ana_list, ana_back, AN_RES_HTTP_PROCESS_BE, s->be);
+                               FLT_ANALYZE(s, res, http_process_res_common,    ana_list, ana_back, AN_RES_HTTP_PROCESS_BE, s->be);
                                ANALYZE    (s, res, flt_analyze_http_headers,   ana_list, ana_back, AN_RES_FLT_HTTP_HDRS);
-                               ANALYZE    (s, res, htx_response_forward_body,  ana_list, ana_back, AN_RES_HTTP_XFER_BODY);
+                               ANALYZE    (s, res, http_response_forward_body, ana_list, ana_back, AN_RES_HTTP_XFER_BODY);
                                ANALYZE    (s, res, pcli_wait_for_response,     ana_list, ana_back, AN_RES_WAIT_CLI);
                                ANALYZE    (s, res, flt_xfer_data,              ana_list, ana_back, AN_RES_FLT_XFER_DATA);
                                ANALYZE    (s, res, flt_end_analyze,            ana_list, ana_back, AN_RES_FLT_END);
@@ -2392,12 +2392,12 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
                            (s->be->server_id_hdr_name != NULL) &&
                            (s->be->mode == PR_MODE_HTTP) &&
                            objt_server(s->target)) {
-                               htx_send_name_header(s, s->be, objt_server(s->target)->id);
+                               http_send_name_header(s, s->be, objt_server(s->target)->id);
                        }
 
                        srv = objt_server(s->target);
                        if (si_b->state == SI_ST_ASS && srv && srv->rdr_len && (s->flags & SF_REDIRECTABLE))
-                               htx_perform_server_redirect(s, si_b);
+                               http_perform_server_redirect(s, si_b);
                } while (si_b->state == SI_ST_ASS);
        }
 
index 49ff672756b1eb5706be2811908f50251301f30f..b2a2b7ed765fe4073464f5d76581448ef2089d1c 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <proto/arg.h>
 #include <proto/http_rules.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/sample.h>
 #include <proto/stream.h>
 #include <proto/tcp_rules.h>
index 7206a1e5c9a38be536eca9b4d8c8ec8841027e25..1e702c029119792811f8fc6d850b3b279f8616ab 100644 (file)
@@ -9,7 +9,7 @@
 #include <types/global.h>
 #include <proto/arg.h>
 #include <proto/log.h>
-#include <proto/proto_http.h>
+#include <proto/http_ana.h>
 #include <proto/http_fetch.h>
 #include <proto/http_htx.h>
 #include <proto/sample.h>