mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Bug 991: Revert "When requested to open local files with a handler use the file in place"
This reverts commit d0be89a16c13d0b228c9dae40bd6cb4137f75b57, and thus restores the ELinks 0.11 behaviour: always copy the data to a temporary file before passing it to a MIME handler, even if the "file:" URI scheme is being used. Previously, ELinks 0.12.GIT passed the name of the original file directly to the handler. That was more efficient but unfortunately gave the wrong result with local CGI. The commit being reverted also claims to partially fix bug 238 (caching of local files). That bug is still open.
This commit is contained in:
parent
5419414b59
commit
13a04b8fbc
@ -1088,30 +1088,6 @@ tp_open(struct type_query *type_query)
|
||||
return;
|
||||
}
|
||||
|
||||
if (type_query->uri->protocol == PROTOCOL_FILE) {
|
||||
unsigned char *file = get_uri_string(type_query->uri, URI_PATH);
|
||||
unsigned char *handler = NULL;
|
||||
|
||||
if (file) {
|
||||
decode_uri(file);
|
||||
handler = subst_file(type_query->external_handler, file);
|
||||
mem_free(file);
|
||||
}
|
||||
|
||||
if (handler) {
|
||||
if (type_query->copiousoutput)
|
||||
read_from_popen(type_query->ses, handler, NULL);
|
||||
else
|
||||
exec_on_terminal(type_query->ses->tab->term,
|
||||
handler, "",
|
||||
type_query->block ? TERM_EXEC_FG : TERM_EXEC_BG);
|
||||
mem_free(handler);
|
||||
}
|
||||
|
||||
done_type_query(type_query);
|
||||
return;
|
||||
}
|
||||
|
||||
continue_download(type_query, "");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user