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.
diff --git a/src/proto_http.c b/src/proto_http.c
index c93afa9..9678d51 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3646,10 +3646,10 @@
* 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 7b601ac..ae8318d 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -2306,7 +2306,7 @@
(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);