summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-01-25 01:45:06 +0000
committerRoger Dingledine <arma@torproject.org>2008-01-25 01:45:06 +0000
commit1445e17a21b5e1e1061ad982865ec66f816461d6 (patch)
treefe872b85933da751d6301456370879632965acdd
parent649a63f435b9b182d78b24b4bd5396fb8b7a03fb (diff)
downloadtor-1445e17a21b5e1e1061ad982865ec66f816461d6.tar.gz
tor-1445e17a21b5e1e1061ad982865ec66f816461d6.zip
We were computing the wrong Content-Length: header for directory
responses that need to be compressed on the fly, causing clients asking for those items to always fail. Bugfix on 0.2.0.x; fixes bug 593. svn:r13268
-rw-r--r--ChangeLog6
-rw-r--r--src/or/directory.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 25f878c73d..a9aa4692d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,7 +8,11 @@ Changes in version 0.2.0.18-alpha - 2008-01-??
code, which is causing log entries like "TLS error while
renegotiating handshake". Disable it again. Resolves bug 590.
- Fix a major memory leak when attempting to use the v2 TLS
- handshake code.
+ handshake code. Bugfix on 0.2.0.x; fixes bug 589.
+ - We were computing the wrong Content-Length: header for directory
+ responses that need to be compressed on the fly, causing clients
+ asking for those items to always fail. Bugfix on 0.2.0.x; fixes
+ bug 593.
o Major features:
- Avoid going directly to the directory authorities even if you're a
diff --git a/src/or/directory.c b/src/or/directory.c
index fc56690629..e4d127e650 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2387,9 +2387,9 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
SMARTLIST_FOREACH(items, const char *, item, {
size_t ln = strlen(item);
if (deflated) {
- body_len += ln; estimated_len += ln;
- } else {
estimated_len += ln/2;
+ } else {
+ body_len += ln; estimated_len += ln;
}
});