diff options
author | Vladimir Kobal <vlad@prokk.net> | 2019-10-16 12:45:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 12:45:12 +0300 |
commit | 05fd62ba5b8ed628310627311e284932cc96fa5f (patch) | |
tree | 969a68ac9db2c466f260584093fd76263cf5353a /backends/prometheus | |
parent | 8ee605861c4cfd02b0e82b30c5d1d358cfbbdf84 (diff) |
Don't write an HTTP response 204 to logs (#7035)
Diffstat (limited to 'backends/prometheus')
-rw-r--r-- | backends/prometheus/backend_prometheus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/prometheus/backend_prometheus.c b/backends/prometheus/backend_prometheus.c index 67342ea7ad..03323ac54f 100644 --- a/backends/prometheus/backend_prometheus.c +++ b/backends/prometheus/backend_prometheus.c @@ -780,7 +780,7 @@ int process_prometheus_remote_write_response(BUFFER *b) { const char *s = buffer_tostring(b); int len = buffer_strlen(b); - // do nothing with HTTP response 200 + // do nothing with HTTP responses 200 or 204 while(!isspace(*s) && len) { s++; @@ -789,7 +789,7 @@ int process_prometheus_remote_write_response(BUFFER *b) { s++; len--; - if(likely(len > 4 && !strncmp(s, "200 ", 4))) + if(likely(len > 4 && (!strncmp(s, "200 ", 4) || !strncmp(s, "204 ", 4)))) return 0; else return discard_response(b, "prometheus remote write"); |