diff options
author | Vonfry <mail@vonfry.name> | 2023-12-31 11:05:55 +0800 |
---|---|---|
committer | Vonfry <mail@vonfry.name> | 2024-01-03 18:51:32 +0800 |
commit | 2e2097cb96680da1351b36c4eff76de274c32242 (patch) | |
tree | 808eab8b6a82b2c0c46f6cc08579a2d481ae499a /pkgs/applications/editors/emacs/elisp-packages/update-melpa.el | |
parent | e9a8b6e46577d11e2e4570b99d1ff7b95012217c (diff) |
update-melpa: use url lib to parse HTTP instead of custom code
This improves compatiblity of parsing http header.
Diffstat (limited to 'pkgs/applications/editors/emacs/elisp-packages/update-melpa.el')
-rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/update-melpa.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/update-melpa.el b/pkgs/applications/editors/emacs/elisp-packages/update-melpa.el index 72d4583900452..9cb6456cd6f9a 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/update-melpa.el +++ b/pkgs/applications/editors/emacs/elisp-packages/update-melpa.el @@ -257,10 +257,9 @@ return Promise to resolve in that process." url (lambda (status) (funcall resolve (condition-case err (progn - (goto-char (point-min)) - (search-forward "\n\n") + (url-http-parse-headers) + (goto-char url-http-end-of-headers) (message (buffer-substring (point-min) (point))) - (delete-region (point-min) (point)) (funcall parser)) (funcall reject err)))))))) |