• Stefan Monnier's avatar
    * lisp/emacs-lisp/package.el: Fix decoding of downloaded files · 5f9671e5
    Stefan Monnier authored
    This is a different fix for bug#34909, which should also fix bug#35739.
    
    Our downloading code used to automatically decode the result according
    to the usual heuristics for files.  This caused problems when we later
    needed to save the data in a file that needed to be byte-for-byte
    equal to the original in order to pass the signature verification,
    especially because we didn't keep track of which coding-system was
    used to decode the data.
    
    (package--unless-error): New macro extracted from
    package--with-response-buffer-1, so that we can specify edebug and
    indent specs.
    (package--with-response-buffer-1): Use it.  More importantly, change
    code so it runs `body` in a unibyte buffer with undecoded data.
    (package--download-one-archive): Don't encode with utf-8 since the data
    is not decoded yet.
    (describe-package-1): Explicitly decode the readem.txt files here.
    
    * lisp/url/url-handlers.el (url-insert-file-contents): Use it.
    (url-insert): Don't decode if buffer is unibyte.
    
    * lisp/url/url-http.el (url-http--insert-file-helper): New function,
    extracted from url-insert-file-contents.
    5f9671e5
Name
Last commit
Last update
admin Loading commit data...
build-aux Loading commit data...
doc Loading commit data...
etc Loading commit data...
leim Loading commit data...
lib Loading commit data...
lib-src Loading commit data...
lisp Loading commit data...
lwlib Loading commit data...
m4 Loading commit data...
modules Loading commit data...
msdos Loading commit data...
nextstep Loading commit data...
nt Loading commit data...
oldXMenu Loading commit data...
src Loading commit data...
test Loading commit data...
.clang-format Loading commit data...
.dir-locals.el Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
BUGS Loading commit data...
CONTRIBUTE Loading commit data...
COPYING Loading commit data...
ChangeLog.1 Loading commit data...
ChangeLog.2 Loading commit data...
ChangeLog.3 Loading commit data...
GNUmakefile Loading commit data...
INSTALL Loading commit data...
INSTALL.REPO Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
autogen.sh Loading commit data...
config.bat Loading commit data...
configure.ac Loading commit data...
make-dist Loading commit data...