mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Avoid a warning when gzip, bzip2 nor lzma is compiled-in.
This commit is contained in:
parent
a556fba1d2
commit
71bd75f759
@ -1887,12 +1887,13 @@ again:
|
|||||||
|
|
||||||
d = parse_header(conn->cached->head, "Content-Encoding", NULL);
|
d = parse_header(conn->cached->head, "Content-Encoding", NULL);
|
||||||
if (d) {
|
if (d) {
|
||||||
|
#if defined(CONFIG_GZIP) || defined(CONFIG_BZIP2) || defined(CONFIG_LZMA)
|
||||||
unsigned char *extension = get_extension_from_uri(uri);
|
unsigned char *extension = get_extension_from_uri(uri);
|
||||||
enum stream_encoding file_encoding;
|
enum stream_encoding file_encoding;
|
||||||
|
|
||||||
file_encoding = extension ? guess_encoding(extension) : ENCODING_NONE;
|
file_encoding = extension ? guess_encoding(extension) : ENCODING_NONE;
|
||||||
mem_free_if(extension);
|
mem_free_if(extension);
|
||||||
|
#endif
|
||||||
/* If the content is encoded, we want to preserve the encoding
|
/* If the content is encoded, we want to preserve the encoding
|
||||||
* if it is implied by the extension, so that saving the URI
|
* if it is implied by the extension, so that saving the URI
|
||||||
* will leave the saved file with the correct encoding. */
|
* will leave the saved file with the correct encoding. */
|
||||||
|
Loading…
Reference in New Issue
Block a user