aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httpd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/httpd.c b/httpd.c
index 60f451a..73e539d 100644
--- a/httpd.c
+++ b/httpd.c
@@ -301,7 +301,10 @@ int server_get_handler(xs_dict *req, const char *q_path,
s = xs_fmt("%s\n", text);
}
else
+ if (xs_type(url) == XSTYPE_STRING)
s = xs_fmt("%s\n", url);
+ else
+ s = xs_str_new(NULL);
status = HTTP_STATUS_OK;
*ctype = "text/html";