# HG changeset patch # User Matthew Wild # Date 1314032272 14400 # Node ID 10a4f3b081a70c6e36fb183ae0291c4d95e04ef2 # Parent 9e2a841739b5468b2f4d57d8d364dde514e4bd98 net.http: Convert port to a number (for custom port in URL) diff -r 9e2a841739b5 -r 10a4f3b081a7 net/http.lua --- 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();