[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Xavante: default request.parsed_url.port
- From: William Trenker <wtrenker@...>
- Date: Thu, 8 Sep 2005 17:03:36 -0400
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
I'm suggesting that that default should be port 80 (or at least nil).
Putting it another way, I suggest that these lines in function
parse_url(req) in httpd.lua:
req.parsed_url = url.parse (def_url)
req.parsed_url.port = req.parsed_url.port or _serverport
should be changed
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.
> but i think it would be
> more Luaistic not to set any default in the core. it should be done
> in CGILuaHandler.set_api()
That's fine -- I leave it to your better judgement. The important
thing is that I can expect the core to at least return nil for the
request's parsed_url.port value if there is no explicit port in the
request's URI. Is that your understanding?
Sorry if I've confused things and thanks for being patient.
Bill