From 2e2097cb96680da1351b36c4eff76de274c32242 Mon Sep 17 00:00:00 2001 From: Vonfry Date: Sun, 31 Dec 2023 11:05:55 +0800 Subject: [PATCH] update-melpa: use url lib to parse HTTP instead of custom code This improves compatiblity of parsing http header. --- .../editors/emacs/elisp-packages/update-melpa.el | 5 ++--- 1 file 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 72d458390045..9cb6456cd6f9 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))))))))