chicken-users
[Top][All Lists]
Advanced

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

Re: I'm starting using chicken4 (Re: [Chicken-users] 4.6.1 performance b


From: Peter Bex
Subject: Re: I'm starting using chicken4 (Re: [Chicken-users] 4.6.1 performance boost
Date: Mon, 4 Oct 2010 16:23:37 +0200
User-agent: Mutt/1.4.2.3i

On Mon, Oct 04, 2010 at 11:02:02PM +0900, Daishi Kato wrote:
> 
> > Yeah, that'd just be a simple wrapper layer around it.
> 
> It's incomplete. I just wanted to ask you if it's
> something valuable to others.

I don't really need this, but Felix has said he liked the old
way, so maybe he likes this.

On the other hand, I just made
http://bugs.call-cc.org/browser/demonstrations/spiffy/webserver.scm
at his request. Perhaps this is convincingly simple enough to
not need the old style requests.

> > > I'm creating 302 response without specifying the host.
> > 
> > Sorry, that's not allowed (see RFC2616, 14.30).  I know, "everyone
> > does it", but it's actually invalid.
> 
> Yeah, I think I've read that some time back.

It sucks, but that's the way it is.

> > Anyway, why would you want to do that at all?  The current request URI
> > is already absolute by default, and having the host in there doesn't
> > hurt, does it?
> 
> I tell you why, and maybe you have an idea for workaround.
> I've started my project with http-server (or spiffy) as a standalone
> http server, however I now have to run on a server that runs Apache
> and only port 80 is available. Hence, I let Apache forward http requests
> to my standalone server (Reverse Proxy).
> If I use the absolute path, it becomes something like
> http://127.0.0.1:8888/.....
> which doesn't make sense.
> One restriction is that I don't want to include the server hostname in scm.

hm, this is interesting.  As you've probably noticed, I've completely
ignored the whole bit about proxies in the RFC.  I think it's time I
start reading this.  Perhaps Apache sends some header that includes the
"real" URI which I could use in Spiffy to update the current-request-uri.

> One solution would be to use SGI, which is not ready in chicken4.

Indeed. However, fastcgi is ready.  You'd need to drop Spiffy then, though.

> > I went through quite some trouble to get it working this way precisely
> > because of the requirement in the RFC that the location should be
> > absolute!  And now you're going through a lot of trouble to strip off
> > that stuff, undoing my work.  I find that rather ironic :)
> 
> Because the rest of my code is old :)

okay :)

> > > wow. I wish you include those examples in the doc.
> > 
> > It's a wiki, you know :) But I've added it for you.
> 
> Ture. I'm not confident to give them nicely.

Fair enough :)

I also added an ASCII art diagram indicating the relation
between the different types of URIs.  Perhaps the predicates
make some sense this way.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

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