summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httpd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/httpd.c b/httpd.c
index 3d0d110..d796f25 100644
--- a/httpd.c
+++ b/httpd.c
@@ -281,8 +281,12 @@ int server_get_handler(xs_dict *req, const char *q_path,
281 const char *text = xs_dict_get(q_vars, "text"); 281 const char *text = xs_dict_get(q_vars, "text");
282 xs *s = NULL; 282 xs *s = NULL;
283 283
284 if (xs_type(text) == XSTYPE_STRING) 284 if (xs_type(text) == XSTYPE_STRING) {
285 s = xs_fmt("%s:\n\n%s\n", text, url); 285 if (xs_type(url) == XSTYPE_STRING)
286 s = xs_fmt("%s:\n\n%s\n", text, url);
287 else
288 s = xs_fmt("%s\n", text);
289 }
286 else 290 else
287 s = xs_fmt("%s\n", url); 291 s = xs_fmt("%s\n", url);
288 292