Ignore Last-Modified header if the value is 0

This commit is contained in:
wbaumann
2009-10-10 17:02:46 +00:00
parent 94af607c70
commit f7af20ba48
5 changed files with 71 additions and 64 deletions

View File

@ -769,8 +769,11 @@ dav_head(const char *path, char **etag, time_t *mtime, off_t *length,
}
value = ne_get_response_header(req, "Last-Modified");
if (!ret && mtime && value)
*mtime = ne_httpdate_parse(value);
if (!ret && mtime && value) {
time_t lm = ne_httpdate_parse(value);
if (lm)
*mtime = lm;
}
value = ne_get_response_header(req, "Content-Length");
if (!ret && length && value)