commit 0007932
default
·
2025-01-02 06:11:58 +0000 UTC
parent 4b87557
Minor tweak to the /share webpoint.
1 files changed,
+6,
-2
M
httpd.c
M
httpd.c
+6,
-2
1@@ -281,8 +281,12 @@ int server_get_handler(xs_dict *req, const char *q_path,
2 const char *text = xs_dict_get(q_vars, "text");
3 xs *s = NULL;
4
5- if (xs_type(text) == XSTYPE_STRING)
6- s = xs_fmt("%s:\n\n%s\n", text, url);
7+ if (xs_type(text) == XSTYPE_STRING) {
8+ if (xs_type(url) == XSTYPE_STRING)
9+ s = xs_fmt("%s:\n\n%s\n", text, url);
10+ else
11+ s = xs_fmt("%s\n", text);
12+ }
13 else
14 s = xs_fmt("%s\n", url);
15