lp:~cjwatson/lazr.restful

Owned by Colin Watson
Get this repository:
git clone https://git.launchpad.net/~cjwatson/lazr.restful
Only Colin Watson can upload to this repository. If you are Colin Watson please log in for upload directions.

Branches

Name Last Modified Last Commit
main 2023-10-17 12:37:52 UTC
Don't send superfluous HTTP headers with 304 responses

Author: Colin Watson
Author Date: 2023-10-17 12:16:52 UTC

Don't send superfluous HTTP headers with 304 responses

RFC 2616 section 10.3.5 and RFC 7232 section 4.1 are both clear that 304
responses SHOULD NOT (or in some cases MUST NOT) include headers other
than a short list relevant to caching. In particular, sending
`Content-Length: 0` is actively harmful because it can end up
instructing caches to replace that header in their cached 200 response,
resulting in incorrect empty cached responses.

I wasn't able to get rid of the `X-Powered-By:` header added by
`zope.publisher`, but that's a fixed string and doesn't really matter.

LP: #2039251

11 of 1 result
This repository contains Public information 
Everyone can see this information.

Subscribers