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))))))))