Handle URLs with unknown schemes gracefully

https://transmom.love/@elilla/107802299616495222
This commit is contained in:
blankie 2024-01-11 11:43:50 +11:00
parent f37d258a8e
commit 726e53a1d7
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ static inline void preprocess_link(const httplib::Request& req, const std::strin
CurlUrl href_url; CurlUrl href_url;
href_url.set(CURLUPART_URL, get_origin(req)); href_url.set(CURLUPART_URL, get_origin(req));
href_url.set(CURLUPART_PATH, std::string(href_url.get(CURLUPART_PATH).get()) + req.path); href_url.set(CURLUPART_PATH, std::string(href_url.get(CURLUPART_PATH).get()) + req.path);
href_url.set(CURLUPART_URL, href); href_url.set(CURLUPART_URL, href, CURLU_NON_SUPPORT_SCHEME);
CurlUrl instance_url_base; CurlUrl instance_url_base;
instance_url_base.set(CURLUPART_SCHEME, "https"); instance_url_base.set(CURLUPART_SCHEME, "https");