diff options
Diffstat (limited to 'src/aclk/https_client.c')
-rw-r--r-- | src/aclk/https_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/aclk/https_client.c b/src/aclk/https_client.c index 2bc768f24b..8bc9914315 100644 --- a/src/aclk/https_client.c +++ b/src/aclk/https_client.c @@ -105,7 +105,8 @@ static int parse_http_hdr(rbuf_t buf, http_parse_ctx *parse_ctx) int idx, idx_end; char buf_key[HTTP_HDR_BUFFER_SIZE]; char buf_val[HTTP_HDR_BUFFER_SIZE]; - char *ptr = buf_key; + char *ptr; + if (!rbuf_find_bytes(buf, HTTP_LINE_TERM, strlen(HTTP_LINE_TERM), &idx_end)) { netdata_log_error("CRLF expected"); return 1; @@ -696,7 +697,7 @@ int https_request(https_req_t *request, https_req_response_t *response) { goto exit_CTX; } - if (!SSL_set_tlsext_host_name(ctx->ssl, connect_host)) { + if (!SSL_set_tlsext_host_name(ctx->ssl, request->host)) { netdata_log_error("Error setting TLS SNI host"); goto exit_CTX; } |