|
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.
Total comments: 1
|
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
|
Total messages: 6
|