Branch: Tag:

2014-11-20

2014-11-20 16:27:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Standards.URI: Support rel being absolute in combine_uri_path().

Roxen.fix_relative() calls combine_uri_path() with an empty base
and an absolute rel to get rid of path segments with "." and "..".

Fixes Roxen.fix_relative() getting a doubled initial "/".

Also adds a related FIXME in reparse_uri().

106:   test_equal((string)Standards.URI("://"), "://")   test_equal((string)Standards.URI("/", "://"), ":///")   test_equal((string)Standards.URI("foo.bar", ":///"), ":///foo.bar") + test_equal(Standards.URI(":///foo/")->combine_uri_path("", "/foo/"), "/foo/")   test_eval_error(Standards.URI("www.com"))   test_eq((string)Standards.URI("www.com","http://"),"http://www.com")   test_eq((string)Standards.URI("www.com/x?a=b#y","http://"),"http://www.com/x?a=b#y")