-
Notifications
You must be signed in to change notification settings - Fork 89
.pathHead is NULL after parsing http:/ #8
Copy link
Copy link
Open
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
On versions 8.4.0 and 8.5.0, the following code will fail on the second assert:
const char* url = "http:/";
UriParserStateA state;
UriUriA uriStruct;
state.uri = &uriStruct;
int err = uriParseUriA(&state, url);
assert(err == URI_SUCCESS);
assert(uriStruct.pathHead != NULL); // this fails
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right