Fix bug: typo

Mistakenly write 'If-Unmodified-Since' to 'If-Modified-Since'

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
main
Jianhui Zhao 2020-09-29 22:09:10 +08:00
parent 80eac83ca3
commit 9c821c12ef
1 changed files with 1 additions and 1 deletions

View File

@ -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;