[plt-scheme] web server directories

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Fri Sep 24 11:42:46 EDT 2004

Jordan Johnson wrote:

> A while ago, Jens Axel Søgaard wrote that the PLT web server could be 
> proxied by Apache:
>>     text-web-server -p 8080
>> ...
>>     In .htaccess :
>>     RewriteEngine On
>>     RewriteRule ^(.*)$ http://localhost:8080/$1 [P]
> I think I already know the answer to this one, but before I go through 
> with setting up the whole deal, I'd like to be sure:  if I'm handling 
> user logins through Apache's .htaccess, will the username given to 
> Apache be available to the PLT server via extract-user/pass?

Maybe, I haven't tried.

The servlet receives a request:

    (define-struct request (method uri headers bindings host-ip client-ip))

Here headers is an environment containing the (optional?) headers for
the http request. The function extract-user-pass takes such an environment
as input and extracts the username and the password from a given 
if it is present.

I don't know in details how Apache handles the username and password, 
but if they
are present in the http headers, then there is no problems.

On the other hand, if they are not present, the extract-user-pass won't 
help you.

Jens Axel Søgaard

Posted on the users mailing list.