[tor-commits] [tor/release-0.3.1] If a _guessed_ compression method fails, it is never PROTOCOL_WARN.

nickm at torproject.org nickm at torproject.org
Thu Jun 29 15:38:19 UTC 2017


commit d8cd68caf1edb24b9daff2eb58f2b5f517b02c52
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Jun 20 11:49:54 2017 -0400

    If a _guessed_ compression method fails, it is never PROTOCOL_WARN.
    
    Rationale: When use a guessed compression method, we already gave a
    PROTOCOL_WARN when our guess differed from the declared method,
    AND we gave a PROTOCOL_WARN when the declared method failed.  It is
    not a protocol problem that the guessed method failed too; it's just
    a recovery attempt that failed.
---
 changes/bug22670   | 4 ++++
 src/or/directory.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug22670 b/changes/bug22670
new file mode 100644
index 0000000..4740327
--- /dev/null
+++ b/changes/bug22670
@@ -0,0 +1,4 @@
+  o Minor bugfixes (logging, compression):
+    - When decompressing, do not warn if we fail to decompress using a
+      compression method that we merely guessed. Fixes part of
+      bug 22670; bugfix on 0.1.1.14-alpha.
diff --git a/src/or/directory.c b/src/or/directory.c
index 1d2f898..b6121d8 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2271,7 +2271,7 @@ dir_client_decompress_response_body(char **bodyp, size_t *bodylenp,
   if (!new_body && tor_compress_supports_method(guessed) &&
       compression != guessed) {
     tor_uncompress(&new_body, &new_len, body, body_len, guessed,
-                   !allow_partial, LOG_PROTOCOL_WARN);
+                   !allow_partial, LOG_INFO);
     tried_both = 1;
   }
   /* If we're pretty sure that we have a compressed directory, and





More information about the tor-commits mailing list