From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: [Potluck] a lightweight web framework Date: Sun, 17 Feb 2013 14:14:33 +0800 Message-ID: References: <1361077395.2535.39.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1361081686 11064 80.91.229.3 (17 Feb 2013 06:14:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Feb 2013 06:14:46 +0000 (UTC) Cc: guile-user , guile-devel To: Nala Ginrut Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Feb 17 07:15:08 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U6xWl-000566-RE for guile-user@m.gmane.org; Sun, 17 Feb 2013 07:15:07 +0100 Original-Received: from localhost ([::1]:44277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6xWP-0003mE-Uu for guile-user@m.gmane.org; Sun, 17 Feb 2013 01:14:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6xWJ-0003m4-DR for guile-user@gnu.org; Sun, 17 Feb 2013 01:14:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6xWE-0008Mt-Um for guile-user@gnu.org; Sun, 17 Feb 2013 01:14:39 -0500 Original-Received: from mail-ie0-x22c.google.com ([2607:f8b0:4001:c03::22c]:55384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6xWE-0008Mh-Ph; Sun, 17 Feb 2013 01:14:34 -0500 Original-Received: by mail-ie0-f172.google.com with SMTP id c10so6293663ieb.3 for ; Sat, 16 Feb 2013 22:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=63sUMPtJJ2JXPa6kgjvoo/DpnGMwWi2kazeqTO2VaCs=; b=Fk8hS8SKmxYhJMPdzFwWo7zjOI/r2bXoNuQMrYcYTCejTIKrQOYsfT63nTWPuy4Lp1 w/nZQCVhaIBgwrf2IMbc4CjSLptOeRirbzLM4Ifm5EFKHu6jyMIL6xpWVUsqiEo7Sf+a r/7fi2LKHkFNXTZCkLyLAeFR+zSApEKvFX8jvAZ0G3i2K+rEFdg4c3KreUzyj3jLjrxt 8nRElqa5Kbwmhn6iSLuKvmUrLWOZQdwFDGxXUth28QrUza8EmxokDEqRUBjkWxS8Rrqi FR63DO05BxswAXQ1TZVJlDzuC53U3HAeojQdn0EcCLT8lrVNup2bV9S/eKghQBHc23x1 SBBQ== X-Received: by 10.50.40.131 with SMTP id x3mr5592143igk.10.1361081673548; Sat, 16 Feb 2013 22:14:33 -0800 (PST) Original-Received: by 10.64.76.51 with HTTP; Sat, 16 Feb 2013 22:14:33 -0800 (PST) In-Reply-To: <1361077395.2535.39.camel@Renee-desktop.suse> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22c X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10110 gmane.lisp.guile.devel:15756 Archived-At: On 17 February 2013 13:03, Nala Ginrut 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. 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