New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pathHead is null after parsing "http:/" #8
Comments
Before I get to take a closer look to confirm or not confirm this as a bug, let me share this shell output: # ./uriparse http:
uri: http:
scheme: http
absolutePath: false
# ./uriparse http:/
uri: http:/
scheme: http
absolutePath: true
# ./uriparse http:/a
uri: http:/a
scheme: http
.. pathSeg: a
absolutePath: true |
I guess I can acknowledge |
I suppose the problem I'm having with this is that the resulting value of pathHead after parsing a path consisting of a single "/" is not consistent between different forms of URI hier-parts. For example, for |
Could be more fun, agreed. Without breaking ABI (or even API), we cannot do anything about it, right? |
Ok fine, then I guess if someone needs to check if a URI has a path, then he'd have to check both pathAbsolute flag and the pathHead pointer to see if either of them is true/non-null.. Because pathHead alone is not enough.. Might need to document this. |
I found this comment block from 55ea6ab in the test suite:
I guess it could use more visibility, sorry. |
On versions 8.4.0 and 8.5.0, the following code will fail on the second assert:
I'm expecting the pathHead to be non-null, because the input string matches the (scheme ":" path-absolute) form of the URI grammar. Also, I'm expecting the first path-segment to be an empty string.
If I changed the input string to
"http:/path"
, or to"http:///"
, the above test passes.The text was updated successfully, but these errors were encountered: