summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c2
-rw-r--r--httpd.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index 4161d83..c7c1b85 100644
--- a/html.c
+++ b/html.c
@@ -458,7 +458,7 @@ d_char *html_entry(snac *snac, d_char *s, char *msg, xs_set *seen, int level)
458 458
459 if (url != NULL) { 459 if (url != NULL) {
460 xs *s1 = xs_fmt("<p><img src=\"%s\" alt=\"%s\"/></p>\n", 460 xs *s1 = xs_fmt("<p><img src=\"%s\" alt=\"%s\"/></p>\n",
461 url, name == NULL ? "" : name); 461 url, xs_is_null(name) ? "" : name);
462 462
463 s = xs_str_cat(s, s1); 463 s = xs_str_cat(s, s1);
464 } 464 }
diff --git a/httpd.c b/httpd.c
index 3ff13c6..c6959e6 100644
--- a/httpd.c
+++ b/httpd.c
@@ -106,6 +106,12 @@ void httpd_connection(int rs)
106 106
107 req = xs_httpd_request(f, &payload, &p_size); 107 req = xs_httpd_request(f, &payload, &p_size);
108 108
109 if (req == NULL) {
110 /* probably because a timeout */
111 fclose(f);
112 return;
113 }
114
109 method = xs_dict_get(req, "method"); 115 method = xs_dict_get(req, "method");
110 q_path = xs_dup(xs_dict_get(req, "path")); 116 q_path = xs_dup(xs_dict_get(req, "path"));
111 117