[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #22206 [Core Tor/Tor]: Fetching compressed consensus gives it uncompressed if Accept-Encoding header is specified
#22206: Fetching compressed consensus gives it uncompressed if Accept-Encoding
header is specified
--------------------------+------------------------------------
Reporter: Sebastian | Owner: ahf
Type: defect | Status: needs_review
Priority: Medium | Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: regression | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by nickm):
Why this approach in particular, and not something more like:
{{{
diff --git a/src/or/directory.c b/src/or/directory.c
index 67c28e1f3e22e4..c1db40ef22cfc2 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -3516,8 +3516,9 @@ directory_handle_command_get,(dir_connection_t
*conn, const char *headers,
tor_free(header);
} else {
compression_methods_supported = (1u << NO_METHOD);
- if (zlib_compressed_in_url)
- compression_methods_supported |= (1u << ZLIB_METHOD);
+ }
+ if (zlib_compressed_in_url) {
+ compression_methods_supported |= (1u << ZLIB_METHOD);
}
/* Remove all methods that we don't both support. */
}}}
(This is a question, not a suggestion -- I'm trying to understand what the
pros and cons of the two approaches are.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22206#comment:15>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs