diff options
| author | 2024-11-07 20:21:02 +0100 | |
|---|---|---|
| committer | 2024-11-07 20:21:02 +0100 | |
| commit | 7dc42f5b3b4a8178eb514e5adf255acc777b04aa (patch) | |
| tree | 140dd6a60712def341a8afad0e32fcf6bcbe4514 | |
| parent | Omit the 'image' field if there are any attachment. (diff) | |
| download | snac2-7dc42f5b3b4a8178eb514e5adf255acc777b04aa.tar.gz snac2-7dc42f5b3b4a8178eb514e5adf255acc777b04aa.tar.xz snac2-7dc42f5b3b4a8178eb514e5adf255acc777b04aa.zip | |
Propagate the caching headers.
| -rw-r--r-- | html.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -3221,6 +3221,12 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 3221 | 3221 | ||
| 3222 | hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); | 3222 | hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); |
| 3223 | 3223 | ||
| 3224 | const char *ims = xs_dict_get(req, "if-modified-since"); | ||
| 3225 | const char *inm = xs_dict_get(req, "if-none-match"); | ||
| 3226 | |||
| 3227 | if (ims) hdrs = xs_dict_append(hdrs, "if-modified-since", ims); | ||
| 3228 | if (inm) hdrs = xs_dict_append(hdrs, "if-none-match", inm); | ||
| 3229 | |||
| 3224 | xs *rsp = xs_http_request("GET", url, hdrs, | 3230 | xs *rsp = xs_http_request("GET", url, hdrs, |
| 3225 | NULL, 0, &status, body, b_size, 0); | 3231 | NULL, 0, &status, body, b_size, 0); |
| 3226 | 3232 | ||