Ticket #299 (closed defect: fixed)
ETag header misses double quotes
| Reported by: | makuk66 | Owned by: | maluke |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.2 |
| Component: | paste | Version: | svn-trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I use Pylons with Paste 1.4.2. When requesting a URL to a file in the public/ directory, Paste responds with:
200 OK Connection: close Date: Thu, 02 Oct 2008 17:08:13 GMT Accept-Ranges: bytes ETag: 1207064740.0-237 Server: PasteWSGIServer/0.5 Python/2.5.1
That ETag value should be a double-quoted string according to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19 and http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
A user reported that this can cause problems with the Polipo proxy.
One quick fix is to change fileapp.py:
ETAG.update(headers, current_etag)
to:
ETAG.update(headers, '"' + current_etag + '"')
which duly produces quotes:
ETag: "1195466889.0-60"
but I have not verified if that has any intended side-effects.
