Closed GoogleCodeExporter closed 9 years ago
RFC 2616 says about 304 responses:
(http://tools.ietf.org/html/rfc2616#section-10.3.5)
If the conditional GET used a strong cache validator (see section
13.3.3), the response SHOULD NOT include other entity-headers.
Otherwise (i.e., the conditional GET used a weak validator), the
response MUST NOT include other entity-headers; this prevents
inconsistencies between cached entity-bodies and updated headers.
Content-Type is entity header and not listed above this paragraph,
so clearly qualifies as "other entity-headers".
I agree with you and Maxim Dounin and I also think there should not be a
Content-Type in a 304 response.
source/see also: http://forum.nginx.org/read.php?2,126124
Original comment by mevdsc...@gmail.com
on 19 Jul 2011 at 6:57
I tested with Apache2 and mongoose and it's output differs on 304 requests (see
attached file) Apache2 is (correctly) not setting a Content-Type header while
mongoose is doing this. Note that Firefox5 ignores the erroneous header on my
machine.
Original comment by mevdsc...@gmail.com
on 19 Jul 2011 at 7:24
Attachments:
After I manually applied the patch by dcraw I saw that it does as it says on
the tin: remove the Content-Type header on errors with an empty body.
Original comment by mevdsc...@gmail.com
on 19 Jul 2011 at 7:34
Removed content-type header,
https://github.com/valenok/mongoose/commit/1e632d32154800e02a4aad5677c432fa66ffa
002
Thanks!
Original comment by valenok
on 22 Sep 2012 at 2:21
Original issue reported on code.google.com by
dcraw...@gmail.com
on 12 Feb 2011 at 4:41Attachments: