mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Fixed crash when testing for the Accept header.
This commit is contained in:
parent
0644518fd5
commit
29a83fa1d2
2
html.c
2
html.c
@ -984,9 +984,11 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* return the RSS if requested by Accept header */
|
/* return the RSS if requested by Accept header */
|
||||||
|
if (accept != NULL) {
|
||||||
if (xs_str_in(accept, "text/xml") != -1 ||
|
if (xs_str_in(accept, "text/xml") != -1 ||
|
||||||
xs_str_in(accept, "application/rss+xml") != -1)
|
xs_str_in(accept, "application/rss+xml") != -1)
|
||||||
p_path = ".rss";
|
p_path = ".rss";
|
||||||
|
}
|
||||||
|
|
||||||
/* check if server config variable 'disable_cache' is set */
|
/* check if server config variable 'disable_cache' is set */
|
||||||
if ((v = xs_dict_get(srv_config, "disable_cache")) && xs_type(v) == XSTYPE_TRUE)
|
if ((v = xs_dict_get(srv_config, "disable_cache")) && xs_type(v) == XSTYPE_TRUE)
|
||||||
|
Loading…
Reference in New Issue
Block a user