commit 33375ac

default  ·  2024-11-10 06:32:48 +0000 UTC
parent a657274
Fixed possible crash in proxy code.
1 files changed,  +1, -1
M html.c
M html.c
+1, -1
1@@ -3221,7 +3221,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2                         NULL, 0, &status, body, b_size, 0);
3 
4             if (valid_status(status)) {
5-                const char *ct = xs_dict_get(rsp, "content-type");
6+                const char *ct = xs_or(xs_dict_get(rsp, "content-type"), "");
7                 const char *lm = xs_dict_get(rsp, "last-modified");
8                 const char *et = xs_dict_get(rsp, "etag");
9