]> granicus.if.org Git - curl/commit
urlapi: fix parsing ipv6 with zone index
authorDaniel Gustafsson <daniel@yesql.se>
Sun, 30 Dec 2018 19:11:57 +0000 (20:11 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Sun, 30 Dec 2018 19:11:57 +0000 (20:11 +0100)
commita4482b21bd8bb0ac7cfb3471bad32bf84f829805
treecd1eff185c2ca2f2d56b4dca942de741a2b97862
parent2a8801d7ba5ec91fb2db83d8627587a5e0c0f5a5
urlapi: fix parsing ipv6 with zone index

The previous fix for parsing IPv6 URLs with a zone index was a paddle
short for URLs without an explicit port. This patch fixes that case
and adds a unit test case.

This bug was highlighted by issue #3408, and while it's not the full
fix for the problem there it is an isolated bug that should be fixed
regardless.

Closes #3411
Reported-by: GitYuanQu on github
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/urlapi.c
tests/unit/unit1653.c