diff options
Diffstat (limited to 'src/http.lua')
| -rw-r--r-- | src/http.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http.lua b/src/http.lua index f031c1d..263e621 100644 --- a/src/http.lua +++ b/src/http.lua | |||
| @@ -244,7 +244,8 @@ end | |||
| 244 | 244 | ||
| 245 | local function adjustheaders(reqt) | 245 | local function adjustheaders(reqt) |
| 246 | -- default headers | 246 | -- default headers |
| 247 | local host = reqt.host | 247 | local hosttype, host = url.classify_host(reqt.host) |
| 248 | if hosttype == "ipv6" then host = "[" .. host .. "]" end | ||
| 248 | local port = tostring(reqt.port) | 249 | local port = tostring(reqt.port) |
| 249 | if port ~= tostring(SCHEMES[reqt.scheme].port) then | 250 | if port ~= tostring(SCHEMES[reqt.scheme].port) then |
| 250 | host = host .. ':' .. port end | 251 | host = host .. ':' .. port end |
