commit f221302

default  ·  2024-11-14 15:21:14 +0000 UTC
parent 6a22a58
Minor tweak to proxy code (some URLs were not correctly formed).
1 files changed,  +1, -1
M html.c
M html.c
+1, -1
1@@ -3223,7 +3223,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2             /* skip to where the proxy/ string starts */
3             raw_path += xs_str_in(raw_path, proxy_prefix);
4 
5-            xs *url = xs_replace(raw_path, proxy_prefix, "https:/" "/");
6+            xs *url = xs_replace_n(raw_path, proxy_prefix, "https:/" "/", 1);
7             xs *hdrs = xs_dict_new();
8 
9             hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT);