https://bz.apache.org/bugzilla/show_bug.cgi?id=58990
Bug ID: 58990
Summary: Option to send "406 Not Acceptable" when mime type in
"Accept" header cannot be fulfilled
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: All
Assignee: [email protected]
Reporter: [email protected]
Apache 2 returns as "200 OK" status code with the full contents when requesting
a URL with an "Accept" header that does not match the content type:
> $ curl -I -H 'Accept: image/png' httpd.apache.org/
> HTTP/1.1 200 OK
> ...
> Content-Type: text/html
This is allowed by RFC 2616[1]:
> Note: HTTP/1.1 servers are allowed to return responses which are
> not acceptable according to the accept headers sent in the
> request.
I would still like to be able to force (configure) Apache to return a "406 Not
Acceptable" when it cannot deliver the content type the client requests.
This would save bandwidth when e.g. crawlers fetch all links on a web site and
express that they only understand HTML in their Accept header. Images and file
downloads wouldn't be delivered to them then, saving bandwidth.
This issue is similare to bug #17936, but this here is a feature request.
[1] https://tools.ietf.org/html/rfc2616#section-10.4.7
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]