summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index c87883d..5d379e8 100644
--- a/html.c
+++ b/html.c
@@ -3216,7 +3216,13 @@ int html_get_handler(const xs_dict *req, const char *q_path,
3216 status = HTTP_STATUS_UNAUTHORIZED; 3216 status = HTTP_STATUS_UNAUTHORIZED;
3217 } 3217 }
3218 else { 3218 else {
3219 xs *url = xs_replace(p_path, "proxy/", "https:/" "/"); 3219 /* pick the raw path (including optional ? arguments) */
3220 const char *raw_path = xs_dict_get(req, "raw_path");
3221
3222 /* skip to where the proxy/ string starts */
3223 raw_path += xs_str_in(raw_path, "proxy/");
3224
3225 xs *url = xs_replace(raw_path, "proxy/", "https:/" "/");
3220 xs *hdrs = xs_dict_new(); 3226 xs *hdrs = xs_dict_new();
3221 3227
3222 hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); 3228 hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT);