[plt-scheme] instaweb, #:listen-ip
I suspected this might be the case. Thank you for the clarification.
Now I can say without further qualification, Thank You All for Instaweb!
Geoffrey
On Jan 7, 2008, at 13:02, Dave Gurnell wrote:
> Hi Geoffrey,
>
> I had a small hand in the development of Instaweb. This is my
> understanding of things, and I may be wrong:
>
> AFAIK, #:listen-ip essentially allows you to specify which network
> interface you want to listen on. The argument value has to be one of
> the IP addresses assigned to the *server* machine. If you're using
> the IP of a client machine (which is what it looks like from your
> email) it won't work. Having said that, when I tried this earlier
> (on Mac OS X) I got a different message from you ("(Can't assign
> requested address; errno=49)").
>
> The most definitive documentation I can find is the Help Desk
> documentation for the MzScheme "tcp-listen" procedure, which is
> where the argument eventually ends up.
>
> If you want to accept connections only from a single client machine,
> you can always check the value of the Host header in your servlet
> code. This doesn't stop the server accepting the connection, but it
> does let you provide an "Access Denied" or "Not Found" HTTP response.
>
> Cheers,
>
> -- Dave