avsm/ocaml-uri — pull request #8 by dsheets (2012-04-05 03:34:51+00:00)
Title: An empty path is distinct from an absolute path

Every URI contains a path component but this path component may be empty (zero length).

In writing the relative URI resolution algorithm specified at , I discovered an error in the 'path' projection function for URIs. Previously, 'path uri' would return "/" if 'uri' contained an empty path element. This is incorrect because "#foo" is a valid relative URI with an empty path that references a fragment in the same document. Calling 'path' on this URI, however, would yield "/" or the root absolute path.

See http://tools.ietf.org/html/rfc3986#section-3.3 for more information about path productions.