guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Potluck] a lightweight web framework


From: Daniel Hartwig
Subject: Re: [Potluck] a lightweight web framework
Date: Sun, 17 Feb 2013 14:14:33 +0800

On 17 February 2013 13:03, Nala Ginrut <address@hidden> wrote:
> PS: and I have to mention that bug, I believe it's a bug.
>
> When the server-handler get the request, I found the uri in request have
> no 'host', it's #f. It causes trouble for me to implement url redirect
> mechanism, which used to implement admin authentication.
> I do think uri should keep 'host' value because it's useful for later.
> And it's OK for 'read-request-line', it'll parse and store 'host'
> correctly.

Most HTTP requests will *not* include an absolute URI.  Instead, the
request line contains only the path.  This is not a bug.

There is a header, host, that can be used to fill in the blank /if it
is present/.  Doing this automatically in the web module is too
prescriptive; instead, each server should do this for itself as it
deems appropriate.  Also, I would just inspect the host header
directly and *never* manipulate the Request-URI.

<http://tools.ietf.org/html/rfc2616#section-5.1.2>

The host header is typically used by a reverse proxy or virtual host
provider to dispatch to the appropriate site handler/module, which
(usually) should not care what its hostname is.

>
> I think there's some link in the inner server module, which dropped
> 'host' value or created a new uri and throw the old-correct one.
> Any comments?

What makes you think that?

>
>
> Sorry again for the half-baked work, it looks no cool. But I've ever
> planed a perfect one... :-(
>

Lets see it get finished then :-)

Regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]