unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: strange 400 Bad Request with Emacs 26 and GNU ELPA
Date: Wed, 20 Oct 2021 18:47:19 +0200	[thread overview]
Message-ID: <CAG7BparwGXdCBmi-BF3apz22RFwxDNC8fwz71NODmYMAfT7b6Q@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 962 bytes --]

Hi,

recently a bug has been reported to me (it is marked as closed
now, but only in Eldev itself, in that I added a workaround for
it):

    https://github.com/doublep/eldev/issues/52

I managed to reduce the way to reproduce it to a fairly short piece of
Elisp code that doesn't depend on Eldev, i.e. is "pure". The
workaround I used is also present in the attached script, but
commented out.

In short:
- run attached script as

    $ emacs --batch --load bad-request.el

  using Emacs 26.x (important!);

- observe that it dies with error
  "https://elpa.gnu.org/packages/org-edna-1.1.2.tar: Bad Request"

The script tries two install two packages (Org and Org-edna) from GNU
ELPA.  The second download dies with the error shown above.  If the
workaround line is uncommented, i.e. if HTTP(S) connection to GNU ELPA
is *not* reused for downloading the second package, it succeeds.

I'm not sure if it is a bug with GNU ELPA, Emacs 26 or something else.

Paul

[-- Attachment #1.2: Type: text/html, Size: 1288 bytes --]

[-- Attachment #2: bad-request.el --]
[-- Type: text/x-emacs-lisp, Size: 569 bytes --]

(require 'package)

(delete-directory "/tmp/400-bad-request" t)

(setf user-emacs-directory "/tmp/400-bad-request/.emacs"
      package-user-dir "/tmp/400-bad-request/elpa"
      package-archives '(("gnu" . "https://elpa.gnu.org/packages/")))

(package-initialize)
(package-refresh-contents)
(package-read-all-archive-contents)

(let ((inhibit-message t))
  (package-install-from-archive (cadr (assq 'org package-archive-contents)))
  ;(clrhash url-http-open-connections)  ; WORKAROUND
  (package-install-from-archive (cadr (assq 'org-edna package-archive-contents))))

                 reply	other threads:[~2021-10-20 16:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG7BparwGXdCBmi-BF3apz22RFwxDNC8fwz71NODmYMAfT7b6Q@mail.gmail.com \
    --to=pogonyshev@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).