lua-users home
lua-l archive

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


On Thursday 08 September 2005 4:03 pm, William Trenker wrote:
> On 9/8/05, Javier Guerra <javier@guerrag.com> wrote:
> > On Thursday 08 September 2005 12:14 pm, William Trenker wrote:
> > > Summation of my understanding of the defaults:
> > >   - httpd request port: 80
> > >   - GGI SERVER_PORT: running server's listening port
> >
> > well, that support Xavante's current implementation;
>
> Oh, Oh.  I think I must have messed something up in my communication.
> Here is what I understand the Xavante core's current default is:
>   - httpd request port: running server's listening port

well, since the only use of parsed_url.port is to set SERVER_PORT for CGILua, 
it's functionally equivalent.

> either 1) to:
>         req.parsed_url = url.parse (def_url)
>         -- 2nd line is removed
> which Luaistically defaults the parsed_url.port as nil if there is no
> explicit port in the request's URI.
> or 2) to:
>         req.parsed_url = url.parse (def_url)
>         req.parsed_url.port = req.parsed_url.port or "80"
> if you choose to default to the http://-scheme standard default.

the problem with (2) is that there's no way for CGILua to get the SERVER_PORT 
as specified for CGI.

i like (1) much better

-- 
Javier

Attachment: pgp9PHYZNUZBJ.pgp
Description: PGP signature