diff options
| author | 2022-11-18 20:37:46 +0100 | |
|---|---|---|
| committer | 2022-11-18 20:37:46 +0100 | |
| commit | 29a83fa1d2737cee2964953f8e9055911115eb5f (patch) | |
| tree | e9f9ccfef4479500112d0d7988174a748a00534d /html.c | |
| parent | Version 2.11 RELEASED. (diff) | |
| download | snac2-29a83fa1d2737cee2964953f8e9055911115eb5f.tar.gz snac2-29a83fa1d2737cee2964953f8e9055911115eb5f.tar.xz snac2-29a83fa1d2737cee2964953f8e9055911115eb5f.zip | |
Fixed crash when testing for the Accept header.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -984,9 +984,11 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char * | |||
| 984 | } | 984 | } |
| 985 | 985 | ||
| 986 | /* return the RSS if requested by Accept header */ | 986 | /* return the RSS if requested by Accept header */ |
| 987 | if (xs_str_in(accept, "text/xml") != -1 || | 987 | if (accept != NULL) { |
| 988 | xs_str_in(accept, "application/rss+xml") != -1) | 988 | if (xs_str_in(accept, "text/xml") != -1 || |
| 989 | p_path = ".rss"; | 989 | xs_str_in(accept, "application/rss+xml") != -1) |
| 990 | p_path = ".rss"; | ||
| 991 | } | ||
| 990 | 992 | ||
| 991 | /* check if server config variable 'disable_cache' is set */ | 993 | /* check if server config variable 'disable_cache' is set */ |
| 992 | if ((v = xs_dict_get(srv_config, "disable_cache")) && xs_type(v) == XSTYPE_TRUE) | 994 | if ((v = xs_dict_get(srv_config, "disable_cache")) && xs_type(v) == XSTYPE_TRUE) |