Fix bug: typo
Mistakenly write 'If-Unmodified-Since' to 'If-Modified-Since' Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>main
parent
80eac83ca3
commit
9c821c12ef
|
@ -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)
|
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) {
|
if (hdr.p && date2unix(hdr) <= s->st_mtime) {
|
||||||
conn->error(conn, HTTP_STATUS_PRECONDITION_FAILED, NULL);
|
conn->error(conn, HTTP_STATUS_PRECONDITION_FAILED, NULL);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue