commit 29a83fa
default
·
2022-11-18 19:37:46 +0000 UTC
parent 0644518
Fixed crash when testing for the Accept header.
1 files changed,
+5,
-3
M
html.c
M
html.c
+5,
-3
1@@ -984,9 +984,11 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
2 }
3
4 /* return the RSS if requested by Accept header */
5- if (xs_str_in(accept, "text/xml") != -1 ||
6- xs_str_in(accept, "application/rss+xml") != -1)
7- p_path = ".rss";
8+ if (accept != NULL) {
9+ if (xs_str_in(accept, "text/xml") != -1 ||
10+ xs_str_in(accept, "application/rss+xml") != -1)
11+ p_path = ".rss";
12+ }
13
14 /* check if server config variable 'disable_cache' is set */
15 if ((v = xs_dict_get(srv_config, "disable_cache")) && xs_type(v) == XSTYPE_TRUE)