diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/http.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http.lua b/src/http.lua index e002a8c..bfa0345 100644 --- a/src/http.lua +++ b/src/http.lua | |||
@@ -226,9 +226,9 @@ local default = { | |||
226 | local function adjustrequest(reqt) | 226 | local function adjustrequest(reqt) |
227 | -- parse url if provided | 227 | -- parse url if provided |
228 | local nreqt = reqt.url and url.parse(reqt.url, default) or {} | 228 | local nreqt = reqt.url and url.parse(reqt.url, default) or {} |
229 | local t = url.parse(reqt.url, default) | ||
230 | -- explicit components override url | 229 | -- explicit components override url |
231 | for i,v in base.pairs(reqt) do nreqt[i] = v end | 230 | for i,v in base.pairs(reqt) do nreqt[i] = v end |
231 | if nreqt.port == "" then nreqt.port = 80 end | ||
232 | socket.try(nreqt.host, "invalid host '" .. base.tostring(nreqt.host) .. "'") | 232 | socket.try(nreqt.host, "invalid host '" .. base.tostring(nreqt.host) .. "'") |
233 | -- compute uri if user hasn't overriden | 233 | -- compute uri if user hasn't overriden |
234 | nreqt.uri = reqt.uri or adjusturi(nreqt) | 234 | nreqt.uri = reqt.uri or adjusturi(nreqt) |