For example: I make a request to http://example.com/some/path with Accept-Header: text/html and the response specifies that the response should be cached. If i then make request to the same url but Accept-Header: application/json, will the cache be ignored as the headers have changed?
If this is not enabled by default, can it be done using entity tags or another cache feature?
RFC 2616 sec. 13.5.1 Suggests that the Accept-header is part of the cache and therefore included in the validation but I can't find it explicitly.
The server needs to indicate that the response varies based on the "Accept" header field. See https://www.greenbytes.de/tech/webdav/rfc7231.html#rfc.section.7.1.4