mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[encoding] Removed deflate
This commit is contained in:
parent
a67c307b03
commit
efad299950
@ -94,7 +94,6 @@ static const struct decoding_backend *const decoding_backends[] = {
|
||||
&gzip_decoding_backend,
|
||||
&bzip2_decoding_backend,
|
||||
&lzma_decoding_backend,
|
||||
&deflate_decoding_backend,
|
||||
&brotli_decoding_backend,
|
||||
&zstd_decoding_backend
|
||||
};
|
||||
|
@ -13,7 +13,6 @@ enum stream_encoding {
|
||||
ENCODING_GZIP,
|
||||
ENCODING_BZIP2,
|
||||
ENCODING_LZMA,
|
||||
ENCODING_DEFLATE,
|
||||
ENCODING_BROTLI,
|
||||
ENCODING_ZSTD,
|
||||
|
||||
|
@ -76,13 +76,6 @@ deflate_open(int window_size, struct stream_encoded *stream, int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
deflate_raw_open(struct stream_encoded *stream, int fd)
|
||||
{
|
||||
/* raw DEFLATE with neither zlib nor gzip header */
|
||||
return deflate_open(-MAX_WBITS, stream, fd);
|
||||
}
|
||||
|
||||
static int
|
||||
deflate_gzip_open(struct stream_encoded *stream, int fd)
|
||||
{
|
||||
@ -233,13 +226,6 @@ restart2:
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
deflate_raw_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
|
||||
{
|
||||
/* raw DEFLATE with neither zlib nor gzip header */
|
||||
return deflate_decode_buffer(st, -MAX_WBITS, data, len, new_len);
|
||||
}
|
||||
|
||||
static char *
|
||||
deflate_gzip_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len)
|
||||
{
|
||||
@ -264,17 +250,6 @@ deflate_close(struct stream_encoded *stream)
|
||||
}
|
||||
}
|
||||
|
||||
static const char *const deflate_extensions[] = { NULL };
|
||||
|
||||
const struct decoding_backend deflate_decoding_backend = {
|
||||
"deflate",
|
||||
deflate_extensions,
|
||||
deflate_raw_open,
|
||||
deflate_read,
|
||||
deflate_raw_decode_buffer,
|
||||
deflate_close,
|
||||
};
|
||||
|
||||
static const char *const gzip_extensions[] = { ".gz", ".tgz", NULL };
|
||||
|
||||
const struct decoding_backend gzip_decoding_backend = {
|
||||
|
@ -8,10 +8,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GZIP
|
||||
extern const struct decoding_backend deflate_decoding_backend;
|
||||
extern const struct decoding_backend gzip_decoding_backend;
|
||||
#else
|
||||
#define deflate_decoding_backend dummy_decoding_backend
|
||||
#define gzip_decoding_backend dummy_decoding_backend
|
||||
#endif
|
||||
|
||||
|
@ -1886,8 +1886,6 @@ again:
|
||||
if (file_encoding != ENCODING_GZIP
|
||||
&& (!c_strcasecmp(d, "gzip") || !c_strcasecmp(d, "x-gzip")))
|
||||
conn->content_encoding = ENCODING_GZIP;
|
||||
if (!c_strcasecmp(d, "deflate") || !c_strcasecmp(d, "x-deflate"))
|
||||
conn->content_encoding = ENCODING_DEFLATE;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ZSTD
|
||||
|
Loading…
Reference in New Issue
Block a user