[plt-scheme] http authentication?

From: Anton van Straaten (anton at appsolutions.com)
Date: Wed Dec 11 19:59:35 EST 2002

MJ Ray wrote:
> Anton van Straaten <anton at appsolutions.com> wrote:
> > Are there any libraries for PLT Scheme that support this?  All
> > I want to do is a simple retrieval of a file via a URL with
> > basic authentication.
> I suspect this is a good idea for a patch.  Shouldn't be difficult
> to do basic auth.  Do you have time, or shall I start work on it?
> (Is it valuable enough to anyone to pay for? ;-) )

I wanted this because a friend was asking about how to do it, and I thought
it could be a good opportunity to start him using PLT Scheme, as opposed to
say, Perl.  So the value was more to the PLT cause :) than anything else.  I
think he's since started using wget instead.

> Maybe it should support the FTP-like but non-RFC
> http://mjr:test@pipe/test (probably not a good choice)

Wget allegedly supports this syntax, according to the docs, although my
recollection is that it didn't work when I tried it.  Its command line
options did work.  I don't think the FTP-like syntax is a bad idea - it
extends the RFC but doesn't break anything, afaict.

> or maybe it should look for any authentication data at the head of the
> list of headers.

I think something like this ideally shouldn't require directly messing with
the protocol on the part of the user who doesn't care about that.  At the
very least, a procedure that can be called with a username and a password
would be nice.

I'll take a look at the get-pure-port solution suggested by Paul, and what
might be involved in wrapping it.  I agree with you that it would be useful
if this functionality were abstracted a bit further, and specifically


Posted on the users mailing list.