Skip to content

Commit ca946c7

Browse files
committed
http/request: No need to tostring host, the pattern always returns a string
1 parent 10d5acb commit ca946c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http/request.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ local function new_from_uri(uri_t, headers)
5353
end
5454
local scheme = assert(uri_t.scheme, "URI missing scheme")
5555
assert(scheme == "https" or scheme == "http" or scheme == "ws" or scheme == "wss", "scheme not valid")
56-
local host = tostring(assert(uri_t.host, "URI must include a host")) -- tostring required to e.g. convert lpeg_patterns IPv6 objects
56+
local host = assert(uri_t.host, "URI must include a host")
5757
local port = uri_t.port or http_util.scheme_to_port[scheme]
5858
local is_connect -- CONNECT requests are a bit special, see http2 spec section 8.3
5959
if headers == nil then

0 commit comments

Comments
 (0)