commit 1cb56afdc1e55e303e3e6b69e90d983ee217d93f Author: Nick Mathewson nickm@torproject.org Date: Wed Jan 24 12:48:12 2018 -0500
Merge prop278 (compression) into dir-spec. --- dir-spec.txt | 34 ++++++++++++++++------ proposals/000-index.txt | 4 +-- ...78-directory-compression-scheme-negotiation.txt | 2 +- 3 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/dir-spec.txt b/dir-spec.txt index 2f4a766..c68918e 100644 --- a/dir-spec.txt +++ b/dir-spec.txt @@ -3623,8 +3623,27 @@
6.1. HTTP headers
- Servers MAY set the Content-Length: header. Servers SHOULD set - Content-Encoding to "deflate" or "identity". + Servers SHOULD set Content-Encoding to the algorithm used to compress the + document(s) being served. Recognized algorithms are: + - "identity" -- RFC2616 section 3.5 + - "deflate" -- RFC2616 section 3.5 + - "gzip" -- RFC2616 section 3.5 + - "x-zstd" -- The zstandard compression algorithm (www.zstd.net) + - "x-tor-lzma" -- The lzma compression algorithm, with a "preset" + value no higher than 6. + + Clients SHOULD use Accept-Encoding to indicate which of the above + compression algorithms they support. If they omit it (as Tor clients + did before 0.3.1.1-alpha), then the server should serve only "deflate" + or "identity" encoded documents, based on the presence or absence of + the ".z" suffix on the requested URL. + + When receiving multiple documents, clients MUST accept compressed + concatenated documents and concatenated compressed documents as + equivalent. + + Servers MAY set the Content-Length: header. When they do, it should + match the number of compressed bytes that they are sending.
Servers MAY include an X-Your-Address-Is: header, whose value is the apparent IP address of the client connecting to them (as a dotted quad). @@ -3780,13 +3799,10 @@ B. General-use HTTP URLs three classes of URLs. Caches may support them, and MUST support them if they have advertised "caches-extra-info".)
- For debugging, directories SHOULD expose non-compressed objects at URLs like - the above, but without the final ".z". - Clients MUST handle compressed concatenated information in two forms: - - A concatenated list of zlib-compressed objects. - - A zlib-compressed concatenated list of objects. - Directory servers MAY generate either format: the former requires less - CPU, but the latter requires less bandwidth. + For debugging, directories SHOULD expose non-compressed objects at + URLs like the above, but without the final ".z". If the client uses + Accept-Encodings header, it should override the presence or absence + of the ".z" (see section 6.1).
Clients SHOULD use upper case letters (A-F) when base16-encoding fingerprints. Servers MUST accept both upper and lower case fingerprints diff --git a/proposals/000-index.txt b/proposals/000-index.txt index 8506966..7cfde0f 100644 --- a/proposals/000-index.txt +++ b/proposals/000-index.txt @@ -198,7 +198,7 @@ Proposals by number: 275 Stop including meaningful "published" time in microdescriptor consensus [OPEN] 276 Report bandwidth with lower granularity in consensus documents [OPEN] 277 Detect multiple relay instances running with same ID [OPEN] -278 Directory Compression Scheme Negotiation [FINISHED] +278 Directory Compression Scheme Negotiation [CLOSED] 279 A Name System API for Tor Onion Services [DRAFT] 280 Privacy-Preserving Statistics with Privcount in Tor [SUPERSEDED] 281 Downloading microdescriptors in bulk [DRAFT] @@ -287,7 +287,6 @@ Proposals by status: 217 Tor Extended ORPort Authentication [for 0.2.5.x] 232 Pluggable Transport through SOCKS proxy [in 0.2.6] 260 Rendezvous Single Onion Services [in 0.2.9.3-alpha] - 278 Directory Compression Scheme Negotiation [in 0.3.1.1-alpha] 284 Hidden Service v3 Control Port CLOSED: 101 Voting on the Tor Directory System [in 0.2.0.x] @@ -368,6 +367,7 @@ Proposals by status: 271 Another algorithm for guard selection [in 0.3.0.1-alpha] 272 Listed routers should be Valid, Running, and treated as such [in 0.2.9.3-alpha, 0.2.9.4-alpha] 274 Rotate onion keys less frequently [in 0.3.1.1-alpha] + 278 Directory Compression Scheme Negotiation [in 0.3.1.1-alpha] SUPERSEDED: 112 Bring Back Pathlen Coin Weight 113 Simplifying directory authority administration diff --git a/proposals/278-directory-compression-scheme-negotiation.txt b/proposals/278-directory-compression-scheme-negotiation.txt index 4630bc4..6f509fc 100644 --- a/proposals/278-directory-compression-scheme-negotiation.txt +++ b/proposals/278-directory-compression-scheme-negotiation.txt @@ -2,7 +2,7 @@ Filename: 278-directory-compression-scheme-negotiation.txt Title: Directory Compression Scheme Negotiation Author: Alexander Færøy Created: 2017-03-06 -Status: Finished +Status: Closed Implemented-In: 0.3.1.1-alpha
0. Overview
tor-commits@lists.torproject.org