aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-11 13:20:15 -0400
committerNick Mathewson <nickm@torproject.org>2012-09-11 13:20:15 -0400
commit5833861f62d2667eeda1ed0f6595763aa00250b0 (patch)
tree654dcbc4cd6faf1a30d9e0ce5fbc9025d89e8f8c /src/or/directory.c
parent8731a4e148e23d8edbb7f32bdfeee30c326f33cc (diff)
parent84f47ffc462dface8db1def322414daa43400d1c (diff)
downloadtor-5833861f62d2667eeda1ed0f6595763aa00250b0.tar
tor-5833861f62d2667eeda1ed0f6595763aa00250b0.tar.gz
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
Conflicts: src/test/test_util.c
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 40344e6b0..f1510b970 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2646,7 +2646,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. */