garycourt / uri-js

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

Error when HOST is a IPv6. #13

Closed JonDotsoy closed 8 years ago

JonDotsoy commented 8 years ago

This is when HOST use within .serialize() with ::.

Example.

Input:

URI.serialize({
  scheme: 'http',
  port: '80',
  host: '::'
});

Output:

http://%3A%3A/
garycourt commented 8 years ago

RFC 3986 Section 3.2.2 requires host IPv6 addresses to be surrounded in square brackets ([::]).