mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'tor-github/pr/960' into maint-0.4.0
This commit is contained in:
commit
a39789a02c
7
changes/bug30001
Normal file
7
changes/bug30001
Normal file
@ -0,0 +1,7 @@
|
||||
o Minor features (testing):
|
||||
- Use the approx_time() function when setting the "Expires" header
|
||||
in directory replies, to make them more testable. Needed for
|
||||
ticket 30001.
|
||||
o Minor bug fixes (testing):
|
||||
- Check the time in the "Expires" header with approx_time().
|
||||
Fixes bug 30001; bugfix on 0.4.0.4-rc.
|
@ -124,7 +124,7 @@ write_http_response_header_impl(dir_connection_t *conn, ssize_t length,
|
||||
long cache_lifetime)
|
||||
{
|
||||
char date[RFC1123_TIME_LEN+1];
|
||||
time_t now = time(NULL);
|
||||
time_t now = approx_time();
|
||||
buf_t *buf = buf_new_with_capacity(1024);
|
||||
|
||||
tor_assert(conn);
|
||||
|
@ -2526,7 +2526,7 @@ test_dir_handle_get_status_vote_next_bandwidth(void* data)
|
||||
|
||||
/* Check cache lifetime */
|
||||
char expbuf[RFC1123_TIME_LEN+1];
|
||||
time_t now = time(NULL);
|
||||
time_t now = approx_time();
|
||||
/* BANDWIDTH_CACHE_LIFETIME is defined in dircache.c. */
|
||||
format_rfc1123_time(expbuf, (time_t)(now + 30*60));
|
||||
char *expires = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user