mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
[httpc] 解决几个ipv6下面的请求规范的问题 (#2149)
* 按照RFC 3986的规范处理ipv6 host的格式化问题,ipv6地址需要用 []括起来 参考: https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2 * 解决ipv6格式不对的问题 * 只有域名的情况下才 set_ext_host_name
This commit is contained in:
@@ -7,7 +7,9 @@ function tlshelper.init_requestfunc(fd, tls_ctx)
|
||||
local readfunc = socket.readfunc(fd)
|
||||
local writefunc = socket.writefunc(fd)
|
||||
return function (hostname)
|
||||
tls_ctx:set_ext_host_name(hostname)
|
||||
if hostname then
|
||||
tls_ctx:set_ext_host_name(hostname)
|
||||
end
|
||||
local ds1 = tls_ctx:handshake()
|
||||
writefunc(ds1)
|
||||
while not tls_ctx:finished() do
|
||||
|
||||
Reference in New Issue
Block a user