1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

Bug 991: Revert "When requested to open local files with a handler use the file in place"

This reverts commit d0be89a16c, 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:
Kalle Olavi Niemitalo 2008-03-08 20:09:59 +02:00 committed by Kalle Olavi Niemitalo
parent 5419414b59
commit 13a04b8fbc

View File

@ -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, "");
}