You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2019/11/09 13:40:06 UTC
[GitHub] [incubator-apisix] membphis commented on a change in pull request
#822: change: don't strip square brackets from the IPv6
membphis commented on a change in pull request #822: change: don't strip square brackets from the IPv6
URL: https://github.com/apache/incubator-apisix/pull/822#discussion_r344444085
##########
File path: lua/apisix/core/utils.lua
##########
@@ -106,7 +106,7 @@ function _M.parse_addr(addr)
local len = #addr
if str_byte(addr, len) == right_bracket then
-- addr in [ip:v6] format
- return sub_str(addr, 2, len-1), default_port
+ return sub_str(addr, 1, len), default_port
Review comment:
I think `sub_str(addr, 1, len)` equal `addr` object, right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services