Menu

#30 Parser will not identify absolute URLs correctly

0.8.4
closed
nobody
None
5
2018-01-07
2016-04-18
No

Following snippet of code fails with version 0.8.4, despite given URL being absolute.

const char* url = "http://www.heise.de/index.html";
UriParserStateA state;
UriUriA uriStruct;
state.uri = &uriStruct;
int err = uriParseUriA(&state, url);
assert(err == URI_SUCCESS);
assert(uriStruct.absolutePath);

Discussion

  • Sebastian Pipping

    Hello Stefan,

    I recall that absolutePath only is set for URLs without a host present. So if it is a bug, you could check for presence of a host first, for a workaround.

    Best, Sebastian

     

    Last edit: Sebastian Pipping 2018-01-05
  • Sebastian Pipping

    • status: open --> closed
     

Log in to post a comment.