From 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 11 Sep 2012 10:41:59 -0400 Subject: Fix assertion failure in tor_timegm. Fixes bug 6811. --- src/or/directory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/or/directory.c') diff --git a/src/or/directory.c b/src/or/directory.c index 29cf10cea0..975f8910cd 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2493,7 +2493,8 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, if ((header = http_get_header(headers, "If-Modified-Since: "))) { struct tm tm; if (parse_http_time(header, &tm) == 0) { - if_modified_since = tor_timegm(&tm); + if (tor_timegm(&tm, &if_modified_since)<0) + if_modified_since = 0; } /* The correct behavior on a malformed If-Modified-Since header is to * act as if no If-Modified-Since header had been given. */ -- cgit v1.2.3-54-g00ecf