Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

error parsing ipv6 [2001:0000:0000:0000:0000:0000:1.9.1.1] #133

Closed
dragosss opened this issue Nov 15, 2012 · 2 comments
Closed

error parsing ipv6 [2001:0000:0000:0000:0000:0000:1.9.1.1] #133

dragosss opened this issue Nov 15, 2012 · 2 comments

Comments

@dragosss
Copy link

for a request http://[2001:0000:0000:0000:0000:0000:1.9.1.1], http-parser takes as Host
2001:0000:0000:0000:0000:0000:1 and not entirely 2001:0000:0000:0000:0000:0000:1.9.1.1

this is because in http_parser.c file, http_parse_host_char(enum http_host_state s, const char ch) function, line 1965 we have:

if (IS_HEX(ch) || ch == ':')

and we should have

if (IS_HEX(ch) || ch == ':' || ch == '.')

@bnoordhuis
Copy link
Member

Duly noted. Want to send in a patch?

emberian added a commit to emberian/http-parser that referenced this issue Dec 4, 2012
emberian added a commit to emberian/http-parser that referenced this issue Dec 4, 2012
@bnoordhuis
Copy link
Member

Fixed in 1c7f8ca.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants