]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
It should be a PROTOCOL_WARN when we have an incorrect content-encoding.
authorNick Mathewson <nickm@torproject.org>
Tue, 20 Jun 2017 15:48:15 +0000 (11:48 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 20 Jun 2017 16:08:11 +0000 (12:08 -0400)
Rationale: The server did not obey the protocol, and its
content-encoding got munged. That's what PROTOCOL_WARN is for.

changes/bug22670_02 [new file with mode: 0644]
src/or/directory.c

diff --git a/changes/bug22670_02 b/changes/bug22670_02
new file mode 100644 (file)
index 0000000..3e7a428
--- /dev/null
@@ -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.
index 89e4bbc49271640d39302c98cf15163335435df4..1d2f8986aa7a8dc4037919ebcf73a04ed4cb3dc0 100644 (file)
@@ -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,