client-side [was: Re: [Web-SIG] Random thoughts]

Greg Stein gstein at
Fri Oct 31 19:18:02 EST 2003

On Fri, Oct 31, 2003 at 04:34:02PM +0000, John J Lee wrote:
> On Thu, 30 Oct 2003, Greg Stein wrote:
> > On Thu, Oct 30, 2003 at 09:51:17PM -0500, Greg Ward wrote:
> > > I'm just catching up on the archive for this list.  Some random
> > > thoughts:
> > >
> > >   * a new package, 'web', is definitely in order.
> > >     "from web import cookies", "from web import http" just sounds right.
> > >     (That contradicts Greg Stein's proposal in PEP 267, but I assume
> > >     he's not strongly wedded to that.)

NOTE: typo here. Greg Ward meant to say "PEP 268"


> > Correct. The name isn't the important part of the PEP. That said, "web" is
> > a big misnomer for [package containing] an http client library, but that's
> > a bikeshed of an entirely different color :-)
> He was talking about the server side!

No, Greg Ward was talking about an http client. Otherwise, he would not
have mentioned PEP 268.

> > I'm more interested in a way of constructing a connection to a server,
> > where that connection has some various combination of features:
> >
> >   * SSL
> That's already down at the httplib level (and the socket level, of
> course).

I know that (given that I wrote the current httplib :-). However, I
maintain that the implementation uses an improper design.

> >   * Basic/Digest/??? authentication
> That's naturally done at the urllib / urllib2 level, given the way it
> works.

There is nothing "natural" about it. That is where it resides, but
authentication is part of the HTTP specification and should be able to be
used by anything attempting to interact at the HTTP level. HTTP is far
more than "fetch the contents of this URL."

My list was specifically intended to say: each of these items belongs in
the core HTTP (client) service layer. Not urllib.

> >   * WebDAV
> I plead ignorance.

RFC 2518 and RFC 3253. Essentially, WebDAV provides a way to write to your
web server. It also provides for versioning support. And a lot of other
stuff. WebDAV provides a lot of interesting features, layered on top of
HTTP. Thus, any HTTP layer should also be able to provide DAV facilities.

> >   * Proxy
> >   * Proxy auth
> Somebody has submitted a patch (515003) to shift this to a lower level
> than urllib2.  I have no opinion as yet.

Oh, geez. Again with the improper design model. Following in this lead,
we'll end up with a combinatoric explosion of every feature combination
ending up with its own class.

/me goes to comment on that patch

> > The current model for the client side uses two, distinct classes to deal
> > with the SSL feature.
> Sorry, which classes are they?

HTTPConnection and HTTPSConnection.  (or HTTP and HTTPS for the backwards
compat stuff). See above about combinatorics using this design model.

> > I have an entirely separate module for the WebDAV stuff.
> How should it be integrated (if at all), in your opinion (assuming you
> want it in the standard library)?

See PEP 268.

> > And authentication isn't even handled in the core http classes, but
> > over in urllib(2). Same for proxy support.
> See above.

See PEP 268 :-)

> > PEP 267 is about a refactoring to bring these features under one cover,
> Er, "Optimized Access to Module Namespaces"?  Which PEP *did* you mean?
> I haven't seen it.

Sorry, I just blindly repeated the number from Greg Ward's post. It really
should be 268.


Greg Stein,

More information about the Web-SIG mailing list