aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-08-22 12:57:52 -0400
committerMatthew Wild <mwild1@gmail.com>2011-08-22 12:57:52 -0400
commita021aa7047368a98938946022003d0e0bd728f32 (patch)
tree15c8cdedce51402e1ac378f6a13adff330c40286 /net
parentcb11644d8dad6d354d495c95ec67b14fd29ce31e (diff)
downloadprosody-a021aa7047368a98938946022003d0e0bd728f32.tar.gz
prosody-a021aa7047368a98938946022003d0e0bd728f32.zip
net.http: Convert port to a number (for custom port in URL)
Diffstat (limited to 'net')
-rw-r--r--net/http.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http.lua b/net/http.lua
index 1fdde22c..a6c704e3 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -134,7 +134,7 @@ function request(u, ex, callback)
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();