Non-conformant Accept header
See original GitHub issueWith the recent fix for #470, HTTPie sends:
Accept: application/json, */*
This header is not quite correct. According to RFC 7231 § 5.3.2, it says: “I accept JSON or anything else”. Because there are no explicit quality values (q=
) specified for either media range, they are both assumed to be 1, so application/json
and */*
are equally acceptable.
*/*
should be marked with a lower quality value, for example:
Accept: application/json, */*;q=0.5
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Nonconforming Acceptance Sample Clauses - Law Insider
Nonconforming Acceptance a) IBM may choose to accept Products which fail to ... on the Pack Header or Pack Trailer records (i.e. out-of-balance...
Read more >Warning message when calling a SOAP webservice
endsWith("\"")) ) { LOGGER.warning("Received WS-I BP non-conformant Unquoted SoapAction HTTP header: "+ soapAction); String fixedSoapAction ...
Read more >net/http: CanonicalHeaderKey capitalization is non ... - GitHub
CanonicalizeHeaderKey returns header keys capitalized as Sec-Websocket-* (without the uppercase S in Socket ). While this may not seem like a ...
Read more >ICMPv6 Errors for Discarding Packets Due to Processing Limits
Network nodes may discard packets if they are unable to process protocol headers of packets due to processing constraints or limits.
Read more >core - Apache HTTP Server Version 2.4
The httpready accept filter buffers entire HTTP requests at the kernel level. ... This directive enables the generation of Content-MD5 headers as defined...
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 FreeTop 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
Top GitHub Comments
Another example.
Sending a request with such Accept header to a Rails app, which is serving browsers & API, will always return an HTML response :
https://github.com/rails/rails/issues/8987
As @kjmph said, it’s because some browsers don’t set quality score correctly.
We can assume this behavior should be quite common to many other web servers
Hi @jakubroztocil, did you take a look on last comments ? Is it possible to reconsider your position on this problem ?