I've got a base URL and some relative URIs in that document I want to have the absolute path of.
E.g. base = https://example.com/some/path.html?query=string and relative URIs in that document:
- index.html → https://example.com/some/index.html
- .. → https://example.com/
- ../../../../abc → https://example.com/abc
- abc/.. → https://example.com/some/
- //example.org/ → https://example.org/
- ftp://example.net/ → ftp://example.net/
In Java you have the class URL accomplishing that:
URL abs = new URL(new URL(basePath), relPath);
But strangely enough I can't find a plain C library or function realizing just that.
Is there a library proving that feature? Or better yet some small self-contained file one can use?