Merge lp:~leonardr/lazr.restfulclient/shorten-cache-filename into lp:lazr.restfulclient
Proposed by
Leonard Richardson
on 2010-02-09
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Brad Crittenden on 2010-02-09 | ||||
| Approved revision: | 86 | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~leonardr/lazr.restfulclient/shorten-cache-filename | ||||
| Merge into: | lp:lazr.restfulclient | ||||
| Diff against target: |
173 lines (+147/-1) 2 files modified
src/lazr/restfulclient/_browser.py (+40/-1) src/lazr/restfulclient/docs/caching.txt (+107/-0) |
||||
| To merge this branch: | bzr merge lp:~leonardr/lazr.restfulclient/shorten-cache-filename | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2010-02-09 | Approve on 2010-02-09 |
|
Review via email:
|
|||
To post a comment you must log in.
| Leonard Richardson (leonardr) wrote : | # |

This branch fixes bug 512832 by ensuring that the filename of a cached representation is never longer than 150 characters. The filename always ends with an MD5 sum derived from the resource's full URL, so truncated filenames won't collide unless there's also a hash collision.
This code copies-and-pastes in code from httplib2. I filed an httplib2 bug (http:// code.google. com/p/httplib2/ issues/ detail? id=92) to deal with the underlying problem in such a way that I can eventually get rid of the copy-and-pasted code.
Tests make up most of this branch.