summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-11 13:21:20 -0400
committerNick Mathewson <nickm@torproject.org>2012-09-11 13:21:20 -0400
commitf8a665c87d21b3bf4325c0c7f369b4ec3fbedd98 (patch)
tree3c4f3d4d6efe5e0843fac87f6e475f615300e902 /src/or/directory.c
parent99cb9696ac617a42a78d9ebfa3f169fd8e4a3d88 (diff)
parent5833861f62d2667eeda1ed0f6595763aa00250b0 (diff)
downloadtor-f8a665c87d21b3bf4325c0c7f369b4ec3fbedd98.tar.gz
tor-f8a665c87d21b3bf4325c0c7f369b4ec3fbedd98.zip
Merge remote-tracking branch 'origin/maint-0.2.3'
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index a865120aeb..d22a8b877d 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2619,7 +2619,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. */