]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http: Call http_send_name_header with the stream instead of the txn
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Oct 2018 13:34:07 +0000 (15:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 20:45:49 +0000 (21:45 +0100)
This is just a minor change to ease integrartion of the HTX.

include/proto/proto_http.h
src/proto_http.c
src/stream.c

index 74bb905b6e7e86560d4af9b74e59f18ffb18fa24..108b7b9409c93399887b24e57dfad50a9d20df3c 100644 (file)
@@ -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);
index c93afa9edef262104959d423bb4ad48ca3fde19d..9678d512b537ae6587c3fdb85399248b9e4cad7b 100644 (file)
@@ -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;
index 7b601ac44664aa109132f1348d2f239682f3546a..ae8318d09181bea31b5ff8b40e051b2e7303a623 100644 (file)
@@ -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);