Re: [Httplib2-discuss] Digest authentication buglet?
Status: Beta
Brought to you by:
jcgregorio
From: Joe G. <jo...@bi...> - 2007-01-18 14:53:15
|
Manuzhai, I just checked a fix for this into subversion. Thanks, -joe On 1/18/07, Manuzhai <man...@gm...> wrote: > Hello there, > > I've been using httplib2 for some things, and it's really nice. I used > to use mechanize and it's derivative mechanoid, and httplib2 feels > much better to me. One thing I would like is a cookie store in the > Http-objects though: so I can really conduct a browser-like session. > > The reason I'm writing this email, though, is that I was wondering > about something I walked up against today while trying to authenticate > against the NewsGator REST API. It supports Digest authentication, but > when GETting a response with the DigestAuthentication thing on it, it > returns neither a Authentication-Info nor a WWW-Authenticate header. I > quickly skimmed the RFC, and it seems this behavior is allowed. > However, the DigestAuthentication.response() method, when no > Authentication-Info header is present, tries to parse the > WWW-Authenticate header, which is not actually there (since we've > already authenticated). Therefore, an Exception occurs in > DigestAuthentication.response()... > > >>> h, rsp = http.request(URL, headers = head) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "build/bdist.linux-i686/egg/httplib2/__init__.py", line 764, in request > File "build/bdist.linux-i686/egg/httplib2/__init__.py", line 616, in _request > File "build/bdist.linux-i686/egg/httplib2/__init__.py", line 359, in response > KeyError: 'digest' > > I hope this can be fixed. If httplib2's behavior is right, I'll gladly > complain to the NewsGator team, but for now it seems this is a problem > with httplib2. > > Regards, > > Manuzhai > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Httplib2-discuss mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/httplib2-discuss > -- Joe Gregorio http://bitworking.org |