accept-encoding: identity should be accepted
See original GitHub issueDescribe the bug
using vector to scrap /metrics
for scraping keycloak metrics.
but keycloak refused to response.
as I reported to vector and I got response
According to the HTTP spec here: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
4. The "identity" content-coding is always acceptable, unless
specifically refused because the Accept-Encoding field includes
"identity;q=0", or because the field includes "*;q=0" and does
not explicitly include the "identity" content-coding. If the
Accept-Encoding field-value is empty, then only the "identity"
encoding is acceptable.
The identity encoding (as you indicate Vector is sending) MUST be acceptable by any remote server.
Version
18.0
Expected behavior
it should report metric with header “accept-encoding: identity”
Actual behavior
curl -v -H "Accept:" -H "accept-encoding: identity" http://localhost:8080/metrics
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /metrics HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8080
> accept-encoding: identity
>
< HTTP/1.1 406 Not Acceptable
< content-length: 69
<
* Connection #0 to host localhost left intact
*
How to Reproduce?
No response
Anything else?
reported to vector github
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Accept-Encoding - HTTP - MDN Web Docs
The Accept-Encoding request HTTP header indicates the content encoding (usually a compression algorithm) that the client can understand.
Read more >Some servers seem to expect 'Accept-Encoding : identity' to ...
I'm going through some URLs, and yes, there are some that will only return a range if Accept-Encoding is absent, or indicates 'identity'....
Read more >Accept-Encoding HTTP Header: Principles, Types, Working ...
The Accept-Encoding HTTP request header determines the content compression algorithm that will be accepted. Accept-Encoding HTTP Header is ...
Read more >HTTP headers | Accept-Encoding - GeeksforGeeks
identity: This directive Indicates the identity function which is always acceptable. *: This directive matches any content encoding which can be ...
Read more >Accept-Encoding - HTTP
The Accept-Encoding request HTTP header advertises which content encoding, ... explicitly set value for identity, the server must never send back a 406....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, I’m convinced 😃
However, this issue is related to how SmallRye Metrics works and we should be talking with them about this behavior.
Created https://github.com/smallrye/smallrye-metrics/issues/497.
Closing as it should be fixed once we upgrade Quarkus.