Skip to content

Commit

Permalink
Fix HTTP header for the remote write exporting connector (#9775)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlvkobal committed Aug 18, 2020
1 parent 2ceb75a commit 7d8dac1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backends/backends.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ void *backends_main(void *ptr) {
"Content-Length: %zu\r\n"
"Content-Type: application/x-www-form-urlencoded\r\n\r\n",
remote_write_path,
hostname,
destination,
data_size
);

Expand Down
2 changes: 1 addition & 1 deletion exporting/prometheus/remote_write/remote_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int prometheus_remote_write_send_header(int *sock, struct instance *instance)
"Content-Length: %zu\r\n"
"Content-Type: application/x-www-form-urlencoded\r\n\r\n",
connector_specific_config->remote_write_path,
instance->engine->config.hostname,
instance->config.destination,
buffer_strlen((BUFFER *)instance->buffer));

size_t header_len = buffer_strlen(header);
Expand Down
2 changes: 1 addition & 1 deletion exporting/tests/test_exporting_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ static void test_prometheus_remote_write_send_header(void **state)
expect_string(
__wrap_send, buf,
"POST /receive HTTP/1.1\r\n"
"Host: test-host\r\n"
"Host: localhost\r\n"
"Accept: */*\r\n"
"X-Prometheus-Remote-Write-Version: 0.1.0\r\n"
"Content-Length: 11\r\n"
Expand Down

0 comments on commit 7d8dac1

Please sign in to comment.