@cryptotaxi247 / netdata-1 / commits / e1d8b9bdb

Include the Host in the HTTP header (#17670)

Include the host in the header

Stelios Fragkakis committed May 15, 2024 at 23:49 UTC e1d8b9bdbfe7ec234ab61cf67c4bae4a5aa08915
1 file changed +1 -3
src/aclk/https_client.c
+1 -3
@@ -524,9 +524,7 @@ static int handle_http_request(https_req_ctx_t *ctx) {
524 buffer_strcat(hdr, HTTP_1_1 HTTP_ENDL);
525
526 //TODO Headers!
527 - if (ctx->request->request_type != HTTP_REQ_CONNECT) {
528 - buffer_sprintf(hdr, "Host: %s\x0D\x0A", ctx->request->host);
529 - }
527 + buffer_sprintf(hdr, "Host: %s\x0D\x0A", ctx->request->host);
528 buffer_strcat(hdr, "User-Agent: Netdata/rocks newhttpclient\x0D\x0A");
529
530 if (ctx->request->request_type == HTTP_REQ_POST && ctx->request->payload && ctx->request->payload_size) {