Edgewall Software
Modify

Opened 16 years ago

Last modified 7 months ago

#6367 new defect

[PATCH] Etag responses need Vary header

Reported by: Dave Gynn <dgynn@…> Owned by:
Priority: normal Milestone: next-stable-1.6.x
Component: web frontend Version: devel
Severity: normal Keywords: etag review patch
Cc: osimons Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The Request.check_modified() function which adds the Etag and checks If-None-Match should be adding a "Vary *" header along with the initial response and the 304 response.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44

This creates a problem of the browser always caching attachments when mod_deflate is used. mod_deflate adds a "Vary Accept-Encoding" header which makes the browser believe that only Accept-Encoding is used to determine cacheability. "Vary *" is needed to let the browser know that other information is used to make caching decisions.

Also note that Request.send_file() function does not send a Cache-Control header. That should be OK if Vary * is sent.

Attachments (1)

etag_vary.diff (477 bytes ) - added by Dave Gynn <dgynn@…> 16 years ago.

Download all attachments as: .zip

Change History (14)

by Dave Gynn <dgynn@…>, 16 years ago

Attachment: etag_vary.diff added

comment:1 by Christian Boos, 16 years ago

Keywords: etag added
Milestone: 0.11.1
Owner: changed from Jonas Borgström to Christopher Lenz

cmlenz, can you validate the proposed approach?

comment:2 by Remy Blank, 14 years ago

Keywords: review added

comment:3 by Christian Boos, 14 years ago

need someone who understands the issue ;-)

comment:4 by Christian Boos, 13 years ago

Milestone: next-minor-0.12.xunscheduled
Owner: Christopher Lenz removed

Needs a caretaker.

comment:5 by Christian Boos, 13 years ago

Component: generalweb frontend
Milestone: unscheduled0.13
Owner: set to Christian Boos

In light of #9936, we should probably fix this one as well.

comment:6 by Volker Braun <Sage@…>, 13 years ago

I have a suspicion that this bug causes our transparent web proxy to serve stale copies of trac raw-attachments. See http://trac.sagemath.org/sage_trac/ticket/11813 for details including HTTP headers. Please let me know if there anything I can do to debug this further.

comment:7 by osimons, 12 years ago

Cc: osimons added

comment:8 by Remy Blank, 12 years ago

Milestone: 1.01.0-triage

Preparing for 1.0.

comment:9 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

comment:10 by figaro, 8 years ago

Keywords: patch added

comment:11 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:12 by Ryan J Ollos, 4 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:13 by Ryan J Ollos, 7 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.