unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Hartwig <mandyke@gmail.com>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: guile-user <guile-user@gnu.org>, guile-devel <guile-devel@gnu.org>
Subject: Re: [Potluck] a lightweight web framework
Date: Sun, 17 Feb 2013 14:14:33 +0800	[thread overview]
Message-ID: <CAN3veRcjCk6LKQgxzvRs-MxU8_6oHwmrftT8N6n2_7Vkaf+pJQ@mail.gmail.com> (raw)
In-Reply-To: <1361077395.2535.39.camel@Renee-desktop.suse>

On 17 February 2013 13:03, Nala Ginrut <nalaginrut@gmail.com> 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	other threads:[~2013-02-17  6:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17  5:03 [Potluck] a lightweight web framework Nala Ginrut
2013-02-17  6:14 ` Daniel Hartwig [this message]
2013-02-17  6:50   ` Nala Ginrut
2013-02-17  6:18 ` Daniel Hartwig
2013-02-19  7:33 ` Nala Ginrut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN3veRcjCk6LKQgxzvRs-MxU8_6oHwmrftT8N6n2_7Vkaf+pJQ@mail.gmail.com \
    --to=mandyke@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=nalaginrut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).