Software /
code /
prosody
Changeset
4356:10a4f3b081a7
net.http: Convert port to a number (for custom port in URL)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 22 Aug 2011 12:57:52 -0400 |
parents | 4355:9e2a841739b5 |
children | 4357:d6928b78c548 |
files | net/http.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http.lua Sat Aug 20 16:51:47 2011 -0400 +++ b/net/http.lua Mon Aug 22 12:57:52 2011 -0400 @@ -134,7 +134,7 @@ req.method, req.headers, req.body = method, headers, body; local using_https = req.scheme == "https"; - local port = req.port or (using_https and 443 or 80); + local port = tonumber(req.port) or (using_https and 443 or 80); -- Connect the socket, and wrap it with net.server local conn = socket.tcp();