On Sat, Aug 04, 2001 at 10:55:44AM +0300, Moshe Zadka wrote: > On Fri, 3 Aug 2001 12:12:54 -0700, Greg Stein <gstein@lyra.org> wrote: > > > That is at least a start on what needs to happen. We can flesh it out with a > > PEP or by checking in the modules. > > (Moshe and I talked about httpauth a bit at the last Python Conference; I > > know he is interested in working on something like that) > > Let me just clarify what we talked about: today, the HTTPConnection already > know how to respond to code 100. Euh... no, it doesn't. It *should*, but it doesn't today. To do it right, a client should be able to install a callback for when the 100-Continue is sent by the server. [ in fact, httplib's HTTPConnection and HTTPResponse should one day be reworked further to support a callback style model, passing the response object; that model allows for HTTP pipelining ] > urllib2 has a very nifty mechanism of handling > all kinds of errors. I have a feeling the responsiblity split is not correct, > and I want to think about some kind of better responsibility split. As I mentioned above, I'll be writing up a PEP discussing this stuff (since it is non-trivial, and I'm guessing there is more than just a couple people's input). Suggestions can go in there. I realized that it shouldn't be "httpauth" but something like "httpext" (extended stuff). We also want proxy support in there. Note that proxy support is connection-based. Authentication is per-request, but we can attach "defaults" for a connection. urllib(2) would simply use the richer HTTPConnection class, shedding some of its work. urllib is about handling a specific URL (of many varieties, not just HTTP), while the connection is about a connection to a server for multiple requests. We can bulk up the connection (IMO, via subclassing), and keep the rich facilities of urllib's "single" request basis. (yes, urllib caches and has richer error handling and stuff, but that is beside the point of beefing up the connection for *all* HTTP clients) Cheers, -g -- Greg Stein, http://www.lyra.org/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4