-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When Accept-Encoding: gzip;q=1, *;q=0 request is received, we should encode the response as gzip even if it's smaller than the default min size (1500B). However, we don't.
To Reproduce
Steps to reproduce the behavior:
- Build Mimir @
93dbb1fc6197e381e3265f72d9c1b399afe570e3 - Build it
make ./cmd/mimir/.uptodate - Run the tutorial
cd tutorials/play-with-grafana-mimir && docker-compose up - Run curl:
$ curl -v -H'X-Scope-OrgId: demo' -H'Accept-Encoding: gzip=1; *;q=0' 'http://localhost:9009/prometheus/api/v1/query?query=1'
* Trying 127.0.0.1:9009...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9009 (#0)
> GET /prometheus/api/v1/query?query=1 HTTP/1.1
> Host: localhost:9009
> User-Agent: curl/7.68.0
> Accept: */*
> X-Scope-OrgId: demo
> Accept-Encoding: gzip=1; *;q=0
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.21.6
< Date: Mon, 16 May 2022 15:57:07 GMT
< Content-Type: application/json
< Content-Length: 77
< Connection: keep-alive
< Server-Timing: querier_wall_time;dur=0.290327, response_time;dur=0.74459
< Vary: Accept-Encoding
<
* Connection #0 to host localhost left intact
{"status":"success","data":{"resultType":"scalar","result":[1652716627,"1"]}}
Expected behavior
Response should be gzip-encoded (or 406 Not Acceptable status should be returned)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working