From 27a3dc8fb236d4604b6d91b33b649b0f559c03ff Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 23 Oct 2018 15:34:07 +0200 Subject: [PATCH] MINOR: http: Call http_send_name_header with the stream instead of the txn This is just a minor change to ease integrartion of the HTX. --- include/proto/proto_http.h | 2 +- src/proto_http.c | 4 ++-- src/stream.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h index 74bb905b6..108b7b940 100644 --- a/include/proto/proto_http.h +++ b/include/proto/proto_http.h @@ -40,7 +40,7 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s 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_send_name_header(struct http_txn *txn, struct proxy* be, const char* svr_name); +int http_send_name_header(struct stream *s, struct proxy* be, const char* svr_name); 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); diff --git a/src/proto_http.c b/src/proto_http.c index c93afa9ed..9678d512b 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3646,10 +3646,10 @@ int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit * for being forwarded. This is the reason why it rewinds the buffer before * proceeding. */ -int http_send_name_header(struct http_txn *txn, struct proxy* be, const char* srv_name) { +int http_send_name_header(struct stream *s, struct proxy* be, const char* srv_name) { struct hdr_ctx ctx; - + struct http_txn *txn = s->txn; char *hdr_name = be->server_id_hdr_name; int hdr_name_len = be->server_id_hdr_len; struct channel *chn = txn->req.chn; diff --git a/src/stream.c b/src/stream.c index 7b601ac44..ae8318d09 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2306,7 +2306,7 @@ redo: (s->be->server_id_hdr_name != NULL) && (s->be->mode == PR_MODE_HTTP) && objt_server(s->target)) { - http_send_name_header(s->txn, s->be, objt_server(s->target)->id); + http_send_name_header(s, s->be, objt_server(s->target)->id); } srv = objt_server(s->target);