]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r17863@catbus: nickm | 2008-02-01 00:27:07 -0500
authorNick Mathewson <nickm@torproject.org>
Fri, 1 Feb 2008 05:27:12 +0000 (05:27 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 1 Feb 2008 05:27:12 +0000 (05:27 +0000)
 Bugfix from weasel: possible fix for 593: make connection_write_to_buf("") work when using zlib compression.

svn:r13347

ChangeLog
src/or/connection.c
src/or/directory.c

index ca2c8554dc72c9faea937a3b7e2183b22ef48b31..fccc2e5be5c0db6964efcd472b6797e14235dd90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,8 @@ Changes in version 0.2.0.19-alpha - 2008-0?-??
     - When our consensus networkstatus has been expired for a while, stop
       being willing to build circuits using it.  Fixes bug 401.  Bugfix on
       0.1.2.x.
+    - Stop incorrectly truncating zlib responses to directory authority
+      signature download requests.  Fix for bug 593.  Bugfix on 0.2.0.x.
 
 
 Changes in version 0.2.0.18-alpha - 2008-01-25
index e64a623ff155dd959910297a769875e31cebe8cf..6564b2d5040c4ebf2fedc0824045ea4f5d6e6364 100644 (file)
@@ -2250,7 +2250,7 @@ _connection_write_to_buf_impl(const char *string, size_t len,
   /* XXXX This function really needs to return -1 on failure. */
   int r;
   size_t old_datalen;
-  if (!len)
+  if (!len && !(zlib<0))
     return;
   /* if it's marked for close, only allow write if we mean to flush it */
   if (conn->marked_for_close && !conn->hold_open_until_flushed)
index c64f290c040625e445510b14b610d9229a70c978..0a7c562fddcede7f94a8d2f0923ab509b7fdb5aa 100644 (file)
@@ -2385,7 +2385,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
     estimated_len += body_len;
     SMARTLIST_FOREACH(items, const char *, item, {
         size_t ln = strlen(item);
-        if (compressed ) {
+        if (compressed) {
           estimated_len += ln/2;
         } else {
           body_len += ln; estimated_len += ln;