Rewrite based off spec (RFC 1808)
This should be backwards compatibile with version 1 if the alwaysNormalize
option is set to true
. This option is required as normalization should only be performed if necessary, according to the spec.
The one exception is a combination like "http://a.com/b/cd?test=1#something" + ";x", which previously incorrectly being resolved as "http://a.com/b/;x", instead of "http://a.com/b/cd;x". To loose the last segment of the path the relative URL should be "./;x".