Ensure mod is properly initialized
Fixes a segfault.
This commit is contained in:
parent
a1fa707eec
commit
21ec61991f
1 changed files with 2 additions and 1 deletions
3
quark.c
3
quark.c
|
@ -211,8 +211,9 @@ responsefile(void) {
|
|||
if (req.type == GET)
|
||||
writetext("\r\n<html><body>"HttpNotFound"</body></html>\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;
|
||||
|
|
Loading…
Reference in a new issue