Re: [Httplib2-discuss] Options for dealing with broken web sites?
Status: Beta
Brought to you by:
jcgregorio
From: Joe G. <jo...@bi...> - 2006-10-28 05:14:59
|
Ok, I added in the ignore_etag attribute with a unit test and updated the documentation. Try the latest version from svn trunk and see if that works for you. Thanks, -joe On 10/27/06, Robert Leftwich <ro...@le...> wrote: > Joe Gregorio wrote: > > Actually I would prefer to see somthing like the > > Http.follow_all_redirects attribute: > > > > http://bitworking.org/projects/httplib2/ref/http-objects.html > > > > I worry about cluttering up request() with even more > > parameters than it already has. > > > > Yep, good point. > > How's this look: > > $ diff -n __init__orig.py __init__.py > a549 1 > self.ignore_etag = False > d698 1 > a698 1 > if method in ["PUT"] and self.cache and info.has_key('etag') and not > self.ignore_etag: > d733 1 > a733 1 > if info.has_key('etag') and not self.ignore_etag: > > > with the documentation along the lines of: > > ignore_etag > Defaults to false. If true, then any etags present in the cached response > are ignored when processing the current request, i.e. httplib2 does *not* use > 'if-match' for PUT or 'if-none-match' when GET or HEAD requests are made. This > is mainly to deal with broken servers, such as IIS, which change the etag after > a server configuration change or reboot, even if the content is unchanged. > > Robert > -- Joe Gregorio http://bitworking.org |