From 9c821c12ef9c4c9bb67bd66d056e68db49c10503 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Tue, 29 Sep 2020 22:09:10 +0800 Subject: [PATCH] Fix bug: typo Mistakenly write 'If-Unmodified-Since' to 'If-Modified-Since' Signed-off-by: Jianhui Zhao --- src/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.c b/src/file.c index 2a70bd6..3b17186 100644 --- a/src/file.c +++ b/src/file.c @@ -117,7 +117,7 @@ static bool file_if_range(struct uh_connection *conn, struct stat *s) static bool file_if_unmodified_since(struct uh_connection *conn, struct stat *s) { - const struct uh_str hdr = conn->get_header(conn, "If-Modified-Since"); + const struct uh_str hdr = conn->get_header(conn, "If-Unmodified-Since"); if (hdr.p && date2unix(hdr) <= s->st_mtime) { conn->error(conn, HTTP_STATUS_PRECONDITION_FAILED, NULL); return false;