Browse Source

It should be a PROTOCOL_WARN when we have an incorrect content-encoding.

Rationale: The server did not obey the protocol, and its
content-encoding got munged. That's what PROTOCOL_WARN is for.
Nick Mathewson 6 years ago
parent
commit
7b3161f008
2 changed files with 5 additions and 1 deletions
  1. 4 0
      changes/bug22670_02
  2. 1 1
      src/or/directory.c

+ 4 - 0
changes/bug22670_02

@@ -0,0 +1,4 @@
+  o Minor bugfixes (logging, compression):
+   - When decompressing, treat mismatch between content-encoding and
+      actual compression type as a protocol warning. Fixes part of bug
+      22670; bugfix on 0.1.1.9-alpha.

+ 1 - 1
src/or/directory.c

@@ -2232,7 +2232,7 @@ dir_client_decompress_response_body(char **bodyp, size_t *bodylenp,
   want_to_try_both = (compression == UNKNOWN_METHOD ||
                       guessed != compression);
   if (want_to_try_both) {
-    severity = LOG_INFO;
+    severity = LOG_PROTOCOL_WARN;
   }
 
   tor_log(severity, LD_HTTP,