summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index 1e09c5e..b5d9148 100644
--- a/html.c
+++ b/html.c
@@ -2796,7 +2796,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
2796 2796
2797 2797
2798int html_get_handler(const xs_dict *req, const char *q_path, 2798int html_get_handler(const xs_dict *req, const char *q_path,
2799 char **body, int *b_size, char **ctype, xs_str **etag) 2799 char **body, int *b_size, char **ctype,
2800 xs_str **etag, xs_str **last_modified)
2800{ 2801{
2801 const char *accept = xs_dict_get(req, "accept"); 2802 const char *accept = xs_dict_get(req, "accept");
2802 int status = HTTP_STATUS_NOT_FOUND; 2803 int status = HTTP_STATUS_NOT_FOUND;
@@ -3227,6 +3228,11 @@ int html_get_handler(const xs_dict *req, const char *q_path,
3227 3228
3228 if (valid_status(status)) { 3229 if (valid_status(status)) {
3229 const char *ct = xs_dict_get(rsp, "content-type"); 3230 const char *ct = xs_dict_get(rsp, "content-type");
3231 const char *lm = xs_dict_get(rsp, "last-modified");
3232 const char *et = xs_dict_get(rsp, "etag");
3233
3234 if (lm) *last_modified = xs_dup(lm);
3235 if (et) *etag = xs_dup(et);
3230 3236
3231 /* find the content-type in the static mime types, 3237 /* find the content-type in the static mime types,
3232 and return that value instead of ct, which will 3238 and return that value instead of ct, which will