mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix problem with double decompression of local files
ELinks tries decompress local gziped files twice, which causes problems with some files eg. with this README.gz. This patch prevents it.
This commit is contained in:
parent
3dadc0ad46
commit
d09bdf7c28
@ -205,7 +205,6 @@ render_encoded_document(struct cache_entry *cached, struct document *document)
|
||||
{
|
||||
struct uri *uri = cached->uri;
|
||||
enum stream_encoding encoding = ENCODING_NONE;
|
||||
unsigned char *extension;
|
||||
struct fragment *fragment = get_cache_fragment(cached);
|
||||
struct string buffer = INIT_STRING("", 0);
|
||||
|
||||
@ -216,7 +215,9 @@ render_encoded_document(struct cache_entry *cached, struct document *document)
|
||||
buffer.length = fragment->length;
|
||||
}
|
||||
|
||||
extension = get_extension_from_uri(uri);
|
||||
if (uri->protocol != PROTOCOL_FILE) {
|
||||
unsigned char *extension = get_extension_from_uri(uri);
|
||||
|
||||
if (extension) {
|
||||
encoding = guess_encoding(extension);
|
||||
mem_free(extension);
|
||||
@ -235,6 +236,7 @@ render_encoded_document(struct cache_entry *cached, struct document *document)
|
||||
encoding = ENCODING_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document->options.plain) {
|
||||
#ifdef CONFIG_DOM
|
||||
|
Loading…
Reference in New Issue
Block a user