Tag: 相关url

来自相对路径的绝对URL

我有一个基本URL和该文档中的一些相对URI我希望有绝对路径。 例如base = https://example.com/some/path.html?query=string和该文档中的相对URI: 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/ 在Java中,您有类URL实现: URL abs = new URL(new URL(basePath), relPath); 但奇怪的是,我找不到一个简单的C库或function实现这一点。 有没有图书馆certificate这个function? 或者更好的是一些可以使用的小型自包含文件?