From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: [Potluck] a lightweight web framework Date: Sun, 17 Feb 2013 14:50:51 +0800 Organization: HFG Message-ID: <1361083851.2535.49.camel@Renee-desktop.suse> 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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361083865 25435 80.91.229.3 (17 Feb 2013 06:51:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Feb 2013 06:51:05 +0000 (UTC) Cc: guile-user , guile-devel To: Daniel Hartwig Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Feb 17 07:51:27 2013 Return-path: Envelope-to: guile-devel@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 1U6y5v-0008BI-M7 for guile-devel@m.gmane.org; Sun, 17 Feb 2013 07:51:27 +0100 Original-Received: from localhost ([::1]:48864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6y5Z-0001oG-IG for guile-devel@m.gmane.org; Sun, 17 Feb 2013 01:51:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6y5U-0001nS-Qm for guile-devel@gnu.org; Sun, 17 Feb 2013 01:51:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6y5Q-0000XB-Vv for guile-devel@gnu.org; Sun, 17 Feb 2013 01:51:00 -0500 Original-Received: from mail-pb0-f50.google.com ([209.85.160.50]:63753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6y5Q-0000Wz-Pt; Sun, 17 Feb 2013 01:50:56 -0500 Original-Received: by mail-pb0-f50.google.com with SMTP id up1so1180333pbc.37 for ; Sat, 16 Feb 2013 22:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:x-mailer:mime-version :content-transfer-encoding; bh=9EmqTcKYM5CVTft0wpWaf2VbbKM/DZ/Q8RVJDkE1XNY=; b=uqhpZDtdyrXUizKOrTToEymAey38x2SoV2gM2yVX+qiuwfg9VdPPa5Jf2UPa/n4e2C utgD2l32LFiqvN0sYwJGzjzx+mdHY5Swl0295L9wU+D6fQ/5eTMaU5i0eIM+ZUdoPa2K 4JPK5ybanMVBx1X21RXbwTWgQZWSVoPY+NKGNuEdt5r/YUN4BICukXGLKbFPMJpnHAx6 M4vZU9WXXflHlU42PAdx1jNAC+vIhHlJRkXD69TRqVg3trtbKsmWhLNHMlXR6aOZoAdu qiB9u10uuntgEpaDUly+3ngxsroI132DBcvnlGRK6kzGq0Aq3WD2DcilcgJSMAbN1bQB N29w== X-Received: by 10.68.24.33 with SMTP id r1mr19261113pbf.139.1361083855403; Sat, 16 Feb 2013 22:50:55 -0800 (PST) Original-Received: from [147.2.147.112] ([61.14.130.226]) by mx.google.com with ESMTPS id rr14sm136886pbb.34.2013.02.16.22.50.52 (version=SSLv3 cipher=RC4-SHA bits=128/128); Sat, 16 Feb 2013 22:50:54 -0800 (PST) In-Reply-To: X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.50 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15758 gmane.lisp.guile.user:10113 Archived-At: hi Daniel! First, I must appreciate for your encourage! That makes me happier though I'm still weak and headache. ;-) On Sun, 2013-02-17 at 14:14 +0800, Daniel Hartwig wrote: > 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? > Well, I thought 'host' should be kept, and 'read-request-line' works, so I guess it was dropped somewhere. OK, if it's not a bug, I think I should avoid to run build-request again, but modify the original uri an pass the original request. Since it'll check the validity, it throw error if 'host' is #f. Is that accepted? > > > > > > 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