Merge lp://staging/~leonardr/lazr.restfulclient/shorten-cache-filename into lp://staging/lazr.restfulclient
Proposed by
Leonard Richardson
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | 86 | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp://staging/~leonardr/lazr.restfulclient/shorten-cache-filename | ||||
Merge into: | lp://staging/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://staging/~leonardr/lazr.restfulclient/shorten-cache-filename | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email:
|
To post a comment you must log in.
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.