Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2812)

Issue 152062: vary header handling for httplib2

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by cdent
Modified:
5 months, 3 weeks ago
Reviewers:
httplib2-dev, jcgregorio
Visibility:
Public.

Description

A naive approach to handling Vary headers in httplib2's caching. This is a quick fix, presumably much can be improved. It's certainly not DRY. The basic idea is that when a resource is cached, it is annotated with information about which headers are listed in the Vary header (if present). In subsequent requests the cache is only valid if those variant headers are the same.

Patch Set 1 #

Total comments: 1

Patch Set 2 : original patch plus tests and changes to test files to make them work #

Patch Set 3 : Changes for both python 2 and 3, along with tweaks to test files to use tail -n. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -15 lines) Patch
M httplib2/__init__.py View 1 2 chunks +24 lines, -0 lines 0 comments Download
M httplib2test.py View 2 3 chunks +74 lines, -1 line 0 comments Download
M python3/httplib2/__init__.py View 2 chunks +24 lines, -0 lines 0 comments Download
M python3/httplib2test.py View 2 chunks +73 lines, -1 line 0 comments Download
M test/300/with-location-header.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/300/without-location-header.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/301/onestep.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/302/no-location.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/302/onestep.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/302/twostep.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/307/onestep.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/410/410.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/deflate/deflated.asis View Binary file 0 comments Download
M test/deflate/failed-compression.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/duplicate-headers/multilink.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/gzip/failed-compression.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/no-store/no-store.asis View 1 chunk +1 line, -1 line 0 comments Download
M test/test.asis View 1 chunk +1 line, -1 line 0 comments Download
A test/vary/accept.asis View 1 chunk +6 lines, -0 lines 0 comments Download
A test/vary/accept-double.asis View 1 chunk +7 lines, -0 lines 0 comments Download
A test/vary/no-vary.asis View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 6
jcgregorio
Please add tests to httplib2test.py. Also, please mirror all these changes, including the tests, to ...
14 years, 5 months ago (2009-11-11 22:17:05 UTC) #1
cdent
On 2009/11/11 22:17:05, jcgregorio wrote: > Please add tests to httplib2test.py. Also, please mirror all ...
14 years, 5 months ago (2009-11-13 13:51:33 UTC) #2
cdent
On 2009/11/13 13:51:33, cdent wrote: > On 2009/11/11 22:17:05, jcgregorio wrote: > > Please add ...
14 years, 5 months ago (2009-11-13 13:54:33 UTC) #3
jcgregorio
Ping. I've got the whole python2/python3 distribution issue fixed and would like to do a ...
14 years, 4 months ago (2009-12-24 14:58:06 UTC) #4
cdent
On Thu, 24 Dec 2009, joe.gregorio@gmail.com wrote: > Ping. I've got the whole python2/python3 distribution ...
14 years, 4 months ago (2009-12-24 16:16:14 UTC) #5
jcgregorio
14 years, 4 months ago (2009-12-24 20:06:53 UTC) #6
Sorry, I misread your previous message and thought there was still changes you
wanted to make. 

Tested and now committed. 

I did have to rollback the changes on the usage of tail in the .asis files from
"-n +2" to "--lines=+2", because the former doesn't work on my hosting provider.

   Thanks,
   -joe

On 2009/12/24 16:16:14, cdent wrote:
> On Thu, 24 Dec 2009, mailto:joe.gregorio@gmail.com wrote:
> 
> > Ping. I've got the whole python2/python3 distribution issue fixed and
> > would like to do a release soon, do you want to try to get this change
> > in that release?
> >
> > http://codereview.appspot.com/152062
> 
> Sure, what needs to happen next?
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b