1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-14 16:50:58 +00:00
emacs/lisp/url
Stefan Monnier 5f9671e57e * lisp/emacs-lisp/package.el: Fix decoding of downloaded files
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.
2019-05-18 18:32:47 -04:00
..
ChangeLog.1 Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-about.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-auth.el Don't have url-basic-auth bug out when called with an URL string 2019-05-15 07:34:35 +02:00
url-cache.el Avoid some double-rounding of Lisp timestamps 2019-02-22 18:33:57 -08:00
url-cid.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-cookie.el Avoid some double-rounding of Lisp timestamps 2019-02-22 18:33:57 -08:00
url-dav.el Simplify use of encode-time 2019-02-10 23:54:35 -08:00
url-dired.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-domsuf.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-expand.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-file.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-ftp.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-future.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-gw.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-handlers.el * lisp/emacs-lisp/package.el: Fix decoding of downloaded files 2019-05-18 18:32:47 -04:00
url-history.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-http.el * lisp/emacs-lisp/package.el: Fix decoding of downloaded files 2019-05-18 18:32:47 -04:00
url-imap.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-irc.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-ldap.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-mailto.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-methods.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-misc.el Omit/rewrite useless regexp repetitions 2019-04-12 19:43:41 -07:00
url-news.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-nfs.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-ns.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-parse.el Fix regular-expression glitches and typos 2019-03-04 18:00:58 -08:00
url-privacy.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-proxy.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-queue.el Avoid some double-rounding of Lisp timestamps 2019-02-22 18:33:57 -08:00
url-tramp.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-util.el Make eww understand #fragment URLs at point interactively 2019-05-13 15:45:52 -04:00
url-vars.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url.el Describe error data in url-retrieve better 2019-05-15 09:45:08 +02:00