diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-01-19 22:40:33 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-01-19 22:40:33 +0000 |
commit | 69fa5be7b624fcda98c7d2e7e8f678f8ee592404 (patch) | |
tree | 7d19255140ded00fd9599a858a366654b2a1bb88 /src/common/torgzip.h | |
parent | e0bf5976658ea76cd8b61d67f957b3c4f68e9108 (diff) | |
download | tor-69fa5be7b624fcda98c7d2e7e8f678f8ee592404.tar.gz tor-69fa5be7b624fcda98c7d2e7e8f678f8ee592404.zip |
Workaround for webservers that lie about Content-Encoding: Tor now tries to autodetect compressed directories and compression itself. (resolves bug 65)
svn:r3374
Diffstat (limited to 'src/common/torgzip.h')
-rw-r--r-- | src/common/torgzip.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/torgzip.h b/src/common/torgzip.h index a023cd0c2d..d6e070f8ec 100644 --- a/src/common/torgzip.h +++ b/src/common/torgzip.h @@ -11,7 +11,9 @@ #define __TORGZIP_H #define TORGZIP_H_ID "$Id$" -typedef enum { GZIP_METHOD=1, ZLIB_METHOD=2 } compress_method_t; +typedef enum { + GZIP_METHOD=1, ZLIB_METHOD=2, UNKNOWN_METHOD=3 +} compress_method_t; int tor_gzip_compress(char **out, size_t *out_len, @@ -24,4 +26,6 @@ tor_gzip_uncompress(char **out, size_t *out_len, int is_gzip_supported(void); +int detect_compression_method(const char *in, size_t in_len); + #endif |