Skip to content

Commit

Permalink
Fix bug: typo
Browse files Browse the repository at this point in the history
Mistakenly write 'If-Unmodified-Since' to 'If-Modified-Since'

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 29, 2020
1 parent 80eac83 commit 9c821c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c821c1

Please sign in to comment.