REORG: proto_htx: Move HTX analyzers & co to http_ana.{c,h} files
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.
This commit is contained in:
parent
a8a46e2041
commit
fc9cfe4006
2
Makefile
2
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 \
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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
|
||||
@ -25,34 +25,34 @@
|
||||
#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);
|
@ -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>
|
||||
|
@ -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
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
2
src/da.c
2
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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -23,13 +23,13 @@
|
||||
#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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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";
|
||||
|
@ -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>
|
||||
|
@ -115,7 +115,7 @@
|
||||
#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>
|
||||
|
16
src/hlua.c
16
src/hlua.c
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
@ -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:
|
||||
*/
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
26
src/stream.c
26
src/stream.c
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user