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 03:07:42
|
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. -joe On 10/27/06, Robert Leftwich <ro...@le...> wrote: > Joe Gregorio wrote: > > > > Yeah, I certainly wouldn't want it to be the default > > behaviour, but a switch should be easy to add. > > > > So, something like? > > $ diff -n __init__orig.py __init__.py > d650 1 > a650 1 > def request(self, uri, method="GET", body=None, headers=None, > redirections=DEFAULT_MAX_REDIRECTS, ignore_etag=False): > a653 1 > ignore_etag - set to True to not use etag even if present (e.g. IIS can > change etags on configuration change or reboot w/o change to content) > d698 1 > a698 1 > if method in ["PUT"] and self.cache and info.has_key('etag') and not > ignore_etag: > d733 1 > a733 1 > if info.has_key('etag') and not ignore_etag: > > Robert > -- Joe Gregorio http://bitworking.org |