mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Don't add "Accept-Encoding" header if directory connection is anonymous.
See: https://bugs.torproject.org/22305
This commit is contained in:
parent
0698a0beca
commit
26795da900
@ -1677,6 +1677,7 @@ directory_send_command(dir_connection_t *conn,
|
|||||||
const char *payload = req->payload;
|
const char *payload = req->payload;
|
||||||
const size_t payload_len = req->payload_len;
|
const size_t payload_len = req->payload_len;
|
||||||
const time_t if_modified_since = req->if_modified_since;
|
const time_t if_modified_since = req->if_modified_since;
|
||||||
|
const int anonymized_connection = dirind_is_anon(req->indirection);
|
||||||
|
|
||||||
char proxystring[256];
|
char proxystring[256];
|
||||||
char hoststring[128];
|
char hoststring[128];
|
||||||
@ -1742,11 +1743,13 @@ directory_send_command(dir_connection_t *conn,
|
|||||||
proxystring[0] = 0;
|
proxystring[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add Accept-Encoding. */
|
if (! anonymized_connection) {
|
||||||
accept_encoding = accept_encoding_header();
|
/* Add Accept-Encoding. */
|
||||||
smartlist_add_asprintf(headers, "Accept-Encoding: %s\r\n",
|
accept_encoding = accept_encoding_header();
|
||||||
accept_encoding);
|
smartlist_add_asprintf(headers, "Accept-Encoding: %s\r\n",
|
||||||
tor_free(accept_encoding);
|
accept_encoding);
|
||||||
|
tor_free(accept_encoding);
|
||||||
|
}
|
||||||
|
|
||||||
/* Add additional headers, if any */
|
/* Add additional headers, if any */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user