snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 7dc42f5b3b4a8178eb514e5adf255acc777b04aa
parent eb6d3d0d0eeb18f470a00d245ba913f8d705abe0
Author: default <nobody@localhost>
Date:   Thu,  7 Nov 2024 20:21:02 +0100

Propagate the caching headers.

Diffstat:
Mhtml.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/html.c b/html.c @@ -3221,6 +3221,12 @@ int html_get_handler(const xs_dict *req, const char *q_path, hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); + const char *ims = xs_dict_get(req, "if-modified-since"); + const char *inm = xs_dict_get(req, "if-none-match"); + + if (ims) hdrs = xs_dict_append(hdrs, "if-modified-since", ims); + if (inm) hdrs = xs_dict_append(hdrs, "if-none-match", inm); + xs *rsp = xs_http_request("GET", url, hdrs, NULL, 0, &status, body, b_size, 0);