[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.3.1] It should be a PROTOCOL_WARN when we have an incorrect content-encoding.
commit 7b3161f0082a626c721acc1100cce0acb40efa85
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Jun 20 11:48:15 2017 -0400
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.
---
changes/bug22670_02 | 4 ++++
src/or/directory.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/changes/bug22670_02 b/changes/bug22670_02
new file mode 100644
index 0000000..3e7a428
--- /dev/null
+++ b/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.
diff --git a/src/or/directory.c b/src/or/directory.c
index 89e4bbc4..1d2f898 100644
--- a/src/or/directory.c
+++ b/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,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits