3 ms·
Well I don't know of anyone who actually does the right thing, but then again I'm not familiar with that many web services. I also don't necessarily think you
by defen 17y ago
Well I don't know of anyone who actually does the right thing, but then again I'm not familiar with that many web services. I also don't necessarily think you should care that some browser sets a bad value - I guess the biggest issue is that since browsers are the most common HTTP clients, other HTTP implementations must conform to what browsers actually do, rather than the HTTP standard.
This points to one of the "problems" with HTTP -- it's very easy to hack together your own solution to a problem instead of following the standard. This generally isn't a huge issue in any particular case, but it does increase the overall cognitive load of developers who deal with many APIs, make it harder to effectively utilize proxies and caching, and increase the amount of work that must be done by servers to accommodate the many clients out there, among other things.
For example, rather than the desired MIME type of the response being specified by the URL itself, or by a query parameter, or by a post body parameter, or by the Accept header, it should just be in one place: the Accept header.