GNU bug report logs - #23253
25.0.90; url-retrieve ignores url-mime-accept-string and most other url variables

Previous Next

Package: emacs;

Reported by: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Date: Sat, 9 Apr 2016 18:53:02 UTC

Severity: normal

Found in version 25.0.90

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23253 in the body.
You can then email your comments to 23253 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23253; Package emacs. (Sat, 09 Apr 2016 18:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Pit--Claudel <clement.pitclaudel <at> live.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Apr 2016 18:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.90; url-retrieve ignores url-mime-accept-string and most other
 url variables
Date: Sat, 9 Apr 2016 14:51:58 -0400
[Message part 1 (text/plain, inline)]
The doc string of url-retrieve says:

> The variables ‘url-request-data’, ‘url-request-method’ and
> ‘url-request-extra-headers’ can be dynamically bound around the
> request; dynamic binding of other variables doesn’t necessarily
> take effect.

It seems that there is no way to set ‘url-mime-encoding-string’, ‘url-mime-charset-string’, and ‘url-mime-accept-string’ for a single asynchronous query (things work with ‘url-retrieve-synchronously’, but not with ‘url-retrieve’).

More precisely: this sends a query with ‘Accept: */*’, and prints nil:

    (let ((url-mime-accept-string "abc/def"))
      (url-retrieve "http://www.gnu.org/software/emacs/"
                    (lambda (&rest _)
                      (message "url-retrieve: %S"
                               url-mime-accept-string))))

but this sends a query with ‘Accept: abc/def’, and prints “abc/def”:

    (let ((url-mime-accept-string "abc/def"))
      (with-current-buffer
          (url-retrieve-synchronously
           "http://www.gnu.org/software/emacs/")
        (message "url-retrieve: %S"
                 url-mime-accept-string)))

If this is exepcted, could we document the proper way to set an Accept header?

Clément.

In GNU Emacs 25.0.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2016-02-23 built on clem-w50-mint
Repository revision: f1dc3dc63ae4e454ca0e98eebbd80f0ba9d5c356
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Linux Mint 17.3 Rosa

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix


[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23253; Package emacs. (Wed, 15 May 2019 04:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 23253 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
Cc: 23253 <at> debbugs.gnu.org
Subject: Re: bug#23253: 25.0.90;
 url-retrieve ignores url-mime-accept-string and most other url
 variables
Date: Wed, 15 May 2019 06:38:06 +0200
Clément Pit--Claudel <clement.pitclaudel <at> live.com> writes:

> It seems that there is no way to set ‘url-mime-encoding-string’, ‘url-mime-charset-string’, and ‘url-mime-accept-string’ for a single asynchronous query (things work with ‘url-retrieve-synchronously’, but not with ‘url-retrieve’).
>
> More precisely: this sends a query with ‘Accept: */*’, and prints nil:
>
>     (let ((url-mime-accept-string "abc/def"))
>       (url-retrieve "http://www.gnu.org/software/emacs/"
>                     (lambda (&rest _)
>                       (message "url-retrieve: %S"
>                                url-mime-accept-string))))

I tried this, and I got

url-retrieve: "abc/def"

so this has apparently been fixed in Emacs 27?  Closing the bug.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 23253 <at> debbugs.gnu.org and Clément Pit--Claudel <clement.pitclaudel <at> live.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 15 May 2019 04:39:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Jun 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.