diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2024-05-23 00:39:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 21:39:56 +0000 |
commit | 271bf8fd10468e18d64f5ac9dca2f9f802f6d239 (patch) | |
tree | 39b2cf19dac7145d211037f924e461808868b007 | |
parent | 9cd6a2459a84e79869d3f9b6fd3f0b1fd0085af9 (diff) |
Include the Host in the HTTP header (mqtt) (#17731)
Add Host: header
-rw-r--r-- | src/aclk/mqtt_websockets/mqtt_wss_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/aclk/mqtt_websockets/mqtt_wss_client.c b/src/aclk/mqtt_websockets/mqtt_wss_client.c index a2aef80ceb..bc67ae7f5b 100644 --- a/src/aclk/mqtt_websockets/mqtt_wss_client.c +++ b/src/aclk/mqtt_websockets/mqtt_wss_client.c @@ -441,7 +441,8 @@ static int http_proxy_connect(mqtt_wss_client client) poll_fd.events = POLLIN; r_buf_ptr = rbuf_get_linear_insert_range(r_buf, &r_buf_linear_insert_capacity); - snprintf(r_buf_ptr, r_buf_linear_insert_capacity,"%s %s:%d %s" HTTP_ENDLINE, PROXY_CONNECT, client->target_host, client->target_port, PROXY_HTTP); + snprintf(r_buf_ptr, r_buf_linear_insert_capacity,"%s %s:%d %s" HTTP_ENDLINE "Host: %s" HTTP_ENDLINE, PROXY_CONNECT, + client->target_host, client->target_port, PROXY_HTTP, client->target_host); write(client->sockfd, r_buf_ptr, strlen(r_buf_ptr)); if (client->proxy_uname) { |