garycourt / uri-js

An RFC 3986 compliant, scheme extendable URI parsing/validating/normalizing/resolving library for JavaScript
Other
305 stars 69 forks source link

Added support for IPv6 scoped addressing zone identifiers #22

Closed pekkanikander closed 6 years ago

pekkanikander commented 7 years ago

Added support for IPv6 scoped address identifiers. The URI_PARSE is also changed to be more strict with the interpretation of the sentence "[IPv6 literal] is the only place where square bracket characters are allowed in the URI syntax." of RFC 3986 Section 3.2.2.

I have tried to divide the changes into a series of smaller commits, to make reviewing easier. It may be wise to squash them before merging.

The last commit f3c1670 rebuilds; it may need to be left out from merging.

garycourt commented 7 years ago

Thanks for this! I'll try to take a look at this this week. In the mean time, could you point me to the relevant RFC & section for IPv6 interface/zone identifiers?

pekkanikander commented 7 years ago

The relevant RFC is https://www.rfc-editor.org/rfc/rfc6874.txt However, the best practise in many local contexts so far has been to allow also host parts of URIs in the form of [ipv6-address%interface]; only with brackets. The latter is what my patch supports, for parsing. I presume the RFC formats of [ipv6-address%25interface] and ipv6-address%25interface should also be supported. The latter may be somewhat tricky, though.

pekkanikander commented 7 years ago

Any progress with this one? Anything you would like me to work on? This week I have time.

garycourt commented 7 years ago

Ah, sorry man. I totally forgot about this job. And now I'm on vacation and won't get to this for another 3 weeks. :-\

On Jul 25, 2017 1:37 AM, "Pekka Nikander" notifications@github.com wrote:

Any progress with this one? Anything you would like me to work on? This week I ahve time.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/garycourt/uri-js/pull/22#issuecomment-317643860, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJs3trab87npa8ZR5MoxegvSszhbIO3ks5sRY0NgaJpZM4NmQMp .

garycourt commented 6 years ago

I'm closing this PR as IPv6 Zone Identifiers has now been added.