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 259eb2b..64bbd8e 100644 --- a/src/http.lua +++ b/src/http.lua | |||
| @@ -229,7 +229,8 @@ end | |||
| 229 | 229 | ||
| 230 | local function adjustheaders(reqt) | 230 | local function adjustheaders(reqt) |
| 231 | -- default headers | 231 | -- default headers |
| 232 | local host = reqt.host | 232 | local hosttype, host = url.classify_host(reqt.host) |
| 233 | if hosttype == "ipv6" then host = "[" .. host .. "]" end | ||
| 233 | local port = tostring(reqt.port) | 234 | local port = tostring(reqt.port) |
| 234 | if port ~= tostring(SCHEMES[reqt.scheme].port) then | 235 | if port ~= tostring(SCHEMES[reqt.scheme].port) then |
| 235 | host = host .. ':' .. port end | 236 | host = host .. ':' .. port end |
