httplib2-discuss Mailing List for httplib2 (Page 2)
Status: Beta
Brought to you by:
jcgregorio
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(4) |
Apr
(11) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(7) |
Nov
(8) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(9) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2010 |
Jan
(6) |
Feb
(3) |
Mar
(3) |
Apr
(4) |
May
(4) |
Jun
(7) |
Jul
(1) |
Aug
(1) |
Sep
(2) |
Oct
(4) |
Nov
|
Dec
|
From: Joe G. <jo...@bi...> - 2007-04-19 19:00:59
|
Rene, The 0.3.0 release of httplib2 adds a 'content-location' header to every response. That 'content-location' header contains the last URI in the redirect chain, which should be used on subsequent requests. Is that content-location not getting through back to the requester? -joe On 4/19/07, Rene Schmit <re...@pt...> wrote: > Hello, > > I use the library in a proxy to retrieve pages from the target servers. > > In this context, the automatic redirect following is no good, as the > browser will not know about the redirect. Consequently, further requests > will be sent to the wrong host, resulting in errors. > > My solution to the problem is to add a flag to the Http class, in the > constructor: > > self.ignore_redirects =3D False > > and to change this line > > if (self.follow_all_redirects or method in ["GET", "HEAD"]) or > response.status =3D=3D 303: > > to: > < if (not self.ignore_redirects) and (self.follow_all_redirects or > method in ["GET", "HEAD"]) or response.status =3D=3D 303: > > > Thus, the default behavior of the library remains unchanged, but gives > the calling code a chance to retrieve the 'raw' reply from the server. > > Does it make sense to add this feature to the library? What about > caching for those replies? > > Ren=E9 Schmit > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Httplib2-discuss mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/httplib2-discuss > --=20 Joe Gregorio http://bitworking.org |
From: Rene S. <re...@pt...> - 2007-04-19 09:36:47
|
Hello again, sorry for this error in my post, it should read: change this line: if response.status in [300, 301, 302, 303, 307]: by: if (not self.ignore_redirects) and response.status in [300, 301, 302, 303, 307]: Rene Schmit wrote: > Hello, > > I use the library in a proxy to retrieve pages from the target servers. > > In this context, the automatic redirect following is no good, as the > browser will not know about the redirect. Consequently, further requests > will be sent to the wrong host, resulting in errors. > > My solution to the problem is to add a flag to the Http class, in the > constructor: > > self.ignore_redirects = False > > and to change this line > > if (self.follow_all_redirects or method in ["GET", "HEAD"]) or > response.status == 303: > > to: > < if (not self.ignore_redirects) and (self.follow_all_redirects or > method in ["GET", "HEAD"]) or response.status == 303: > > > Thus, the default behavior of the library remains unchanged, but gives > the calling code a chance to retrieve the 'raw' reply from the server. > > Does it make sense to add this feature to the library? What about > caching for those replies? > > René Schmit > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Httplib2-discuss mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/httplib2-discuss > > > |
From: Rene S. <re...@pt...> - 2007-04-19 09:07:41
|
Hello, I use the library in a proxy to retrieve pages from the target servers. In this context, the automatic redirect following is no good, as the browser will not know about the redirect. Consequently, further requests will be sent to the wrong host, resulting in errors. My solution to the problem is to add a flag to the Http class, in the constructor: self.ignore_redirects = False and to change this line > if (self.follow_all_redirects or method in ["GET", "HEAD"]) or response.status == 303: to: < if (not self.ignore_redirects) and (self.follow_all_redirects or method in ["GET", "HEAD"]) or response.status == 303: Thus, the default behavior of the library remains unchanged, but gives the calling code a chance to retrieve the 'raw' reply from the server. Does it make sense to add this feature to the library? What about caching for those replies? René Schmit |
From: Joe G. <jo...@bi...> - 2007-02-14 03:38:30
|
On 1/27/07, Sanghyeon Seo <sa...@gm...> wrote: > httplib2 homepage shows "old method" to connect to SourceForge SVN, > namely, connecting to svn.sourceforge.net instead of > httplib2.svn.sourceforge.net. I think you may want to correct it. > > See this SourceForge documentation for detail: > http://sourceforge.net/docs/E09#notice Thanks for heads up, now fixed! Thanks, -joe > > -- > Seo Sanghyeon > > ------------------------------------------------------------------------- > 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 |
From: Sanghyeon S. <sa...@gm...> - 2007-01-27 14:56:13
|
httplib2 homepage shows "old method" to connect to SourceForge SVN, namely, connecting to svn.sourceforge.net instead of httplib2.svn.sourceforge.net. I think you may want to correct it. See this SourceForge documentation for detail: http://sourceforge.net/docs/E09#notice -- Seo Sanghyeon |
From: Joe G. <jo...@bi...> - 2007-01-23 15:29:39
|
Ah, ok, after I parse up the incoming URI I should check for a valid scheme and authority and throw an exception before I try to use those - possibly 'None' - values. Thanks, -joe On 1/23/07, Ian Bicking <ia...@co...> wrote: > Joe Gregorio wrote: > > Yup, that's a known bug :) > > http://sourceforge.net/tracker/index.php?func=detail&aid=1529838&group_id=161082&atid=818434 > > My bug is actually different -- httplib2.request('/') is invalid > (probably should be a ValueError, I guess). It fails long before > anything HTTP is opened -- it happens around the time you parse '/' as a > URI. > > -- > Ian Bicking | ia...@co... | http://blog.ianbicking.org > -- Joe Gregorio http://bitworking.org |
From: Ian B. <ia...@co...> - 2007-01-23 15:15:12
|
Joe Gregorio wrote: > Yup, that's a known bug :) > http://sourceforge.net/tracker/index.php?func=detail&aid=1529838&group_id=161082&atid=818434 My bug is actually different -- httplib2.request('/') is invalid (probably should be a ValueError, I guess). It fails long before anything HTTP is opened -- it happens around the time you parse '/' as a URI. -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
From: Joe G. <jo...@bi...> - 2007-01-23 15:13:40
|
I've logged this as a bug, thanks! http://sourceforge.net/tracker/index.php?func=detail&aid=1642616&group_id=161082&atid=818434 Thanks, -joe On 1/19/07, Ian Bicking <ia...@co...> wrote: > httplib2 seems to be using email.Message.Message.items() for getting the > headers. I believe this function folds headers in a way that is > supposed to be valid for HTTP, but in practice does not produce valid > Set-Cookie headers. In paste.proxy I encountered this problem, and had > to do this to pipe accurate headers through: > > for full_header in res.msg.headers: > header, value = full_header.split(':', 1) > value = value.strip() > headers_out.append((header, value)) > > There might also be a safe way to fold multiple Set-Cookie headers, but > the standard ways to fold headers don't work. Maybe parsing the cookie > headers and then reserializing would work; then you could use a dict. > Otherwise something like paste.util.multidict.MultiDict could still > support the headers (or wsgiref has another header dict-like object, I > believe). > > -- > Ian Bicking | ia...@co... | http://blog.ianbicking.org > > ------------------------------------------------------------------------- > 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 |
From: Joe G. <jo...@bi...> - 2007-01-23 15:06:23
|
Yup, that's a known bug :) http://sourceforge.net/tracker/index.php?func=detail&aid=1529838&group_id=161082&atid=818434 I am hoping to fix that along with this one: http://sourceforge.net/tracker/index.php?func=detail&aid=1597381&group_id=161082&atid=818434 I.e. The fix will map all exceptions to httplib2 specific exceptions and then provide an *option* to map all those exceptions into HTTP status codes. -joe On 1/20/07, Ian Bicking <ia...@co...> wrote: > If I pass in a bad URL (like '/foo'), httplib2 gives errors like > 'NoneType has no foo attribute'. A better error message is called for ;) > > -- > Ian Bicking | ia...@co... | http://blog.ianbicking.org > > ------------------------------------------------------------------------- > 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 |
From: Ian B. <ia...@co...> - 2007-01-20 20:35:23
|
If I pass in a bad URL (like '/foo'), httplib2 gives errors like 'NoneType has no foo attribute'. A better error message is called for ;) -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
From: Ian B. <ia...@co...> - 2007-01-19 05:28:57
|
httplib2 seems to be using email.Message.Message.items() for getting the headers. I believe this function folds headers in a way that is supposed to be valid for HTTP, but in practice does not produce valid Set-Cookie headers. In paste.proxy I encountered this problem, and had to do this to pipe accurate headers through: for full_header in res.msg.headers: header, value = full_header.split(':', 1) value = value.strip() headers_out.append((header, value)) There might also be a safe way to fold multiple Set-Cookie headers, but the standard ways to fold headers don't work. Maybe parsing the cookie headers and then reserializing would work; then you could use a dict. Otherwise something like paste.util.multidict.MultiDict could still support the headers (or wsgiref has another header dict-like object, I believe). -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
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 |
From: Manuzhai <man...@gm...> - 2007-01-18 13:28:49
|
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 |
From: Joe G. <jo...@bi...> - 2006-12-18 21:39:16
|
Just for the record, this bug has been fixed in trunk. http://sourceforge.net/tracker/index.php?func=detail&aid=1597306&group_id=161082&atid=818434 Thanks, -joe On 11/15/06, Sam Ruby <ru...@in...> wrote: > Joe Gregorio wrote: > > On 11/14/06, Sam Ruby <ru...@in...> wrote: > >> It looks like the current implementation takes the md5 of a somewhat > >> normalized URI and passes that as a key to the cache. > >> > >> For debug-ability and to increase the potential for integration with > >> other subsystems, I'd like to suggest that this be changed to pass > >> either the original URI unaltered or a normalized URI with the logic to > >> do the normalization refactored out into a separate function. > > > > This is a great idea, I was frankly jealous when I looked at the > > Venus cache and saw that it was filled with non-opaque named > > files. > > :-) > > >> Either way, the current FileCache could do the remaining > >> normalization/hashing of the key. Other storage systems could either > >> use the key as is, or could employ a different hash mechanism. > > > > That works for me, shouldn't take long to implement. > > The attached patch does not break any existing unit tests. This does > open up the question as to what normalization should be done. You are > welcome to any or all of the code and unit tests mentioned here: > > http://www.intertwingly.net/blog/2004/08/04/Urlnorm > > > Thanks, > > -joe > > - Sam Ruby > > > > -- Joe Gregorio http://bitworking.org |
From: Joe G. <jo...@bi...> - 2006-12-18 16:28:29
|
Now fixed in the trunk. Thanks!, -joe On 12/18/06, Sanghyeon Seo <sa...@gm...> wrote: > Hello, > > I am trying to run httplib2 on IronPython. And the first hurdle is the > usage of __builtins__ in httplib2. > > Python Library Reference states: > http://docs.python.org/lib/module-builtin.html > > "As an implementation detail, most modules have the name __builtins__ > (note the "s") made available as part of their globals. The value of > __builtins__ is normally either this module or the value of this > modules's __dict__ attribute. Since this is an implementation detail, > it may not be used by alternate implementations of Python." > > And indeed it isn't. So I'd like this to be changed. > > Current code: > > if 'sorted' not in __builtins__: > # replacement code > > Suggestion 1: > > try: > sorted > except NameError: > # replacement code > > Suggestion 2: > > if sys.version_info < (2, 4): > # replacement code > > -- > Seo Sanghyeon > > ------------------------------------------------------------------------- > 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 |
From: Sanghyeon S. <sa...@gm...> - 2006-12-18 08:38:50
|
Hello, I am trying to run httplib2 on IronPython. And the first hurdle is the usage of __builtins__ in httplib2. Python Library Reference states: http://docs.python.org/lib/module-builtin.html "As an implementation detail, most modules have the name __builtins__ (note the "s") made available as part of their globals. The value of __builtins__ is normally either this module or the value of this modules's __dict__ attribute. Since this is an implementation detail, it may not be used by alternate implementations of Python." And indeed it isn't. So I'd like this to be changed. Current code: if 'sorted' not in __builtins__: # replacement code Suggestion 1: try: sorted except NameError: # replacement code Suggestion 2: if sys.version_info < (2, 4): # replacement code -- Seo Sanghyeon |
From: Igor F. <igo...@gm...> - 2006-12-12 18:13:35
|
On 12-Dec-06, at 12:41 PM, Joe Gregorio wrote: > On 12/8/06, Simon Willison <si...@si...> wrote: >> One solution might be for httplib2 to have two request methods - one >> that raises exceptions and one that returns the document with the >> non-200 status code. It would be nice if Python had a standard idiom >> or naming convention for pairs of methods like this, but it's not >> something I've seen anywhere. There might be a good reason for that >> of course. > > I'm thinking of at least making this a switch, on by default, that > turns > all exceptions into status codes. One of the big reasons for doing > do is > getting back information on failures. For example, if the number of > re-directs > exceeds the limit the caller may want to see the chain of response > objects when debugging. The best way to accommodate that is to return > a response and not throw an exception. > > This would be a Http property like 'follow_all_redirects'. I'm not entirely sure that it makes sense for _all_ exceptions, but such a switch would definitely be useful in a lot of cases. Another possible way to do this is have the exception that httplib2 throws contain the response information in some format. The syntax of catching these conditions (404 not found, or infinte redirects) as exceptions makes a lot of sense, the important part is to be able to get at the underlying cause of the exception, and the chain of events that caused it. You also say that this is useful when debugging, but a situation like this isn't necessarily a failure, it could be an expected turn of events. Thanks, Igor |
From: Joe G. <jo...@bi...> - 2006-12-12 17:41:18
|
On 12/8/06, Simon Willison <si...@si...> wrote: > One solution might be for httplib2 to have two request methods - one > that raises exceptions and one that returns the document with the > non-200 status code. It would be nice if Python had a standard idiom > or naming convention for pairs of methods like this, but it's not > something I've seen anywhere. There might be a good reason for that > of course. I'm thinking of at least making this a switch, on by default, that turns all exceptions into status codes. One of the big reasons for doing do is getting back information on failures. For example, if the number of re-directs exceeds the limit the caller may want to see the chain of response objects when debugging. The best way to accommodate that is to return a response and not throw an exception. This would be a Http property like 'follow_all_redirects'. Thanks, -joe -- Joe Gregorio http://bitworking.org |
From: Simon W. <si...@si...> - 2006-12-08 11:11:32
|
On 7 Dec 2006, at 12:01, Sam Ruby wrote: > What's bad (IMO) is that httplib2, like its predecessor does both. > Do I get a 408 or a socket.timeout? Actually, you can get both. > > Since status codes are not going away, I would suggest mapping more > exceptions to status codes, and documenting the few (if any) > remaining "expected exceptions". It's interesting to note the difference here between Python's urllib and urllib2 modules: >>> import urllib, urllib2 >>> urllib.urlopen('http://simonwillison.net/nothing-here').read() '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head> \n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1> \n<p>The requested URL /nothing-here was not found on this server.</p> \n</body></html>\n' >>> urllib2.urlopen('http://simonwillison.net/nothing-here').read() Traceback (most recent call last): ... File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/urllib2.py", line 499, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 404: Not Found >>> Whether or not this is desired behaviour depends very much on what you are trying to do. One solution might be for httplib2 to have two request methods - one that raises exceptions and one that returns the document with the non-200 status code. It would be nice if Python had a standard idiom or naming convention for pairs of methods like this, but it's not something I've seen anywhere. There might be a good reason for that of course. Cheers, Simon |
From: Joe G. <jo...@bi...> - 2006-12-07 21:25:40
|
On 11/26/06, Igor Foox <igo...@gm...> wrote: > Hi Joe, > > I was looking to use httplib2 for it's easy integration with the > Google authentication system. However I need to be able to handle > cookies as well, is there a simple way to make httplib2 handle cookis? Not right now. I've added it as a feature request: http://sourceforge.net/tracker/index.php?func=detail&aid=1611116&group_id=161082&atid=818437 > Another problem I hit is that when I send a request that hits a > continual redirect there is no way for me to extract the server's > response after the httplib2.RedirectLimit has been thrown. Am I > missing some apparent way I can access it? There is already an open bug that addresses this: http://sourceforge.net/tracker/index.php?func=detail&aid=1597381&group_id=161082&atid=818434 That is, instead of throwing exceptions a response code will be assigned to the exceptional condition. That will allow you to pull the final request location from the returned response dictionary. So, neither of those things work right now, but they are on the list of things to do. Thanks, -joe -- Joe Gregorio http://bitworking.org |
From: Simon W. <si...@si...> - 2006-12-07 09:52:56
|
Hi, httplib2 currently provides a number of custom exceptions, but these =20 do not cover all of the potential error conditions. For example, try =20 the following: >>> import httplib2 >>> httplib2.Http().request('http://localhost:9999/') # This server =20 is not currently running Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/willison/pythonmods/httplib2/__init__.py", line 781, =20 in request (response, content) =3D self._request(conn, authority, uri, =20 request_uri, method, body, headers, redirections, cachekey) File "/Users/willison/pythonmods/httplib2/__init__.py", line 603, =20 in _request (response, content) =3D self._conn_request(conn, request_uri, =20 method, body, headers) File "/Users/willison/pythonmods/httplib2/__init__.py", line 581, =20 in _conn_request conn.connect() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/=20 python2.5/httplib.py", line 679, in connect raise socket.error, msg socket.error: (61, 'Connection refused') >>> It would be useful if httplib2 =03caught low-level socket exceptions =20 and re-raised them as custom exceptions that are subclasses of =20 HttpLib2Error. This would allow a single "except HttpLib2Error" =20 statement to catch any errors that occurred during a request, no =20 matter if they came from httplib2, httplib or the socket module. Cheers, Simon |
From: Igor F. <igo...@gm...> - 2006-11-26 18:22:21
|
Hi Joe, I was looking to use httplib2 for it's easy integration with the Google authentication system. However I need to be able to handle cookies as well, is there a simple way to make httplib2 handle cookis? Another problem I hit is that when I send a request that hits a continual redirect there is no way for me to extract the server's response after the httplib2.RedirectLimit has been thrown. Am I missing some apparent way I can access it? Thanks, Igor |
From: Joe G. <jo...@bi...> - 2006-11-16 17:58:29
|
On 11/16/06, Halton Huo <Hal...@su...> wrote: > Hi, > > I'm now playing with opensync google Calendar plubgins, it is introduce > httplib2, see this is very useful lib. > > I saw the document proxy is on the todo list, I'm wondering when it can > be ready, I'm eager to use this good feature. It is on the list of things to do, but since no one had ever asked for it - until now - I hadn't given it a high priority. I will have to bump it up a little higher in the priority list. Or you could guarantee it gets in there by implementing it and submitting the patches :) Thanks, -joe -- Joe Gregorio http://bitworking.org |
From: Halton H. <Hal...@Su...> - 2006-11-16 09:47:54
|
Hi, I'm now playing with opensync google Calendar plubgins, it is introduce httplib2, see this is very useful lib. I saw the document proxy is on the todo list, I'm wondering when it can be ready, I'm eager to use this good feature. Thanks, Halton. |
From: Sam R. <ru...@in...> - 2006-11-15 23:04:41
|
Joe Gregorio wrote: > On 11/14/06, Sam Ruby <ru...@in...> wrote: >> It looks like the current implementation takes the md5 of a somewhat >> normalized URI and passes that as a key to the cache. >> >> For debug-ability and to increase the potential for integration with >> other subsystems, I'd like to suggest that this be changed to pass >> either the original URI unaltered or a normalized URI with the logic to >> do the normalization refactored out into a separate function. > > This is a great idea, I was frankly jealous when I looked at the > Venus cache and saw that it was filled with non-opaque named > files. :-) >> Either way, the current FileCache could do the remaining >> normalization/hashing of the key. Other storage systems could either >> use the key as is, or could employ a different hash mechanism. > > That works for me, shouldn't take long to implement. The attached patch does not break any existing unit tests. This does open up the question as to what normalization should be done. You are welcome to any or all of the code and unit tests mentioned here: http://www.intertwingly.net/blog/2004/08/04/Urlnorm > Thanks, > -joe - Sam Ruby |