From 726e53a1d7d06349b512991de040148db4bdd6c2 Mon Sep 17 00:00:00 2001 From: blankie Date: Thu, 11 Jan 2024 11:43:50 +1100 Subject: [PATCH] Handle URLs with unknown schemes gracefully https://transmom.love/@elilla/107802299616495222 --- htmlhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htmlhelper.cpp b/htmlhelper.cpp index 3eb1f5f..4e60b4b 100644 --- a/htmlhelper.cpp +++ b/htmlhelper.cpp @@ -140,7 +140,7 @@ static inline void preprocess_link(const httplib::Request& req, const std::strin CurlUrl href_url; 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_URL, href); + href_url.set(CURLUPART_URL, href, CURLU_NON_SUPPORT_SCHEME); CurlUrl instance_url_base; instance_url_base.set(CURLUPART_SCHEME, "https");