diff --git a/quark.c b/quark.c index 43e976b..f5a74a3 100644 --- a/quark.c +++ b/quark.c @@ -211,8 +211,9 @@ responsefile(void) { if (req.type == GET) writetext("\r\n"HttpNotFound"\r\n"); } else { + snprintf(mod, sizeof(mod), "%s", tstamp(st.st_mtim.tv_sec)); /* check if modified */ - if (!strcmp(reqmod, tstamp(st.st_mtim.tv_sec)) + if (!strcmp(reqmod, mod) && !putresentry(HEADER, HttpNotModified, tstamp(0))) { /* not modified, we're done here*/ status = 304;