diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-02-09 08:38:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-02-09 08:38:25 -0500 |
commit | 6a649ca3f34c404c3be9107f63bb1011126facc1 (patch) | |
tree | adb2a6bf410bbcd9c2ca1cc520824a8c55ec314e /dir-spec.txt | |
parent | 6bd0a699a0856240480a4bc339722db142beec0a (diff) | |
parent | 1cb56afdc1e55e303e3e6b69e90d983ee217d93f (diff) | |
download | torspec-6a649ca3f34c404c3be9107f63bb1011126facc1.tar.gz torspec-6a649ca3f34c404c3be9107f63bb1011126facc1.zip |
Merge branch 'document_prop278'
Diffstat (limited to 'dir-spec.txt')
-rw-r--r-- | dir-spec.txt | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/dir-spec.txt b/dir-spec.txt index 0e5f048..003e400 100644 --- a/dir-spec.txt +++ b/dir-spec.txt @@ -3627,8 +3627,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). @@ -3784,13 +3803,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 |