Ticket #299 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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.

Change History

Changed 3 years ago by maluke

  • owner changed from ianb to maluke
  • status changed from new to assigned

Changed 3 years ago by maluke

webob.Response.etag needs the same fix, fix etag parsing too.

Changed 3 years ago by maluke

  • status changed from assigned to closed
  • resolution set to fixed

fixed both in Paste and WebOb?

Note: See TracTickets for help on using tickets.