From: Federico Tedin <federicotedin@gmail.com>
To: winston@ml1.net
Cc: 33002@debbugs.gnu.org
Subject: bug#33002: 26.1; EWW sends unspecific "Accept: */*" header
Date: Sat, 13 Oct 2018 18:59:05 -0300 [thread overview]
Message-ID: <CAA8GjPnVe8xPr6rCTKdL52oBV5sRrwEgfmX0PB8XMUtOxwCwkw@mail.gmail.com> (raw)
In-Reply-To: <f951de3c-4624-c3d3-eeb8-00367bbc906c@ml1.net>
> I noticed EWW sends header "Accept: */*", which appears to prevent
> HTTP servers that provide multiple content types from picking a sensible
> response content type.
>
> More information about the Accept header with a list of RFCs at the
> bottom of the page can be found here [1]. For comparison lynx sends a
> more specific header, which indicates It'd prefer common web content
> types before anything else [2]. I experienced this particular bug when
> browsing [3], which uses the Accept header to determine when to show the
> built-in API Explorer. In a web browser it shows a HTML form to interact
> with the API, however actual API clients use "Accept: application/json"
> or similar to get the desired format.
I've been looking into this problem. It seems that EWW uses
url-retrieve to retrieve HTTP contents, which then calls url-http. In
url-http, the variable url-mime-accept-string is used as the value for
the HTTP Accept header (if it is set to nil, "*/*" is used
instead). By default, url-mime-accept-string is set to nil.
We could temporarily set the variable url-mime-accept-string with
another value when url-retrieve is called by EWW. I am not sure what
the default value should be, or if it should be configurable. Maybe
the same value used by Lynx would be a good starting point.
next prev parent reply other threads:[~2018-10-13 21:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 5:11 bug#33002: 26.1; EWW sends unspecific "Accept: */*" header Winston Weinert
2018-10-13 21:59 ` Federico Tedin [this message]
2018-11-04 3:15 ` Federico Tedin
2018-11-04 17:27 ` Eli Zaretskii
2018-11-04 18:29 ` Federico Tedin
2018-11-13 21:26 ` Federico Tedin
2018-11-14 3:31 ` Eli Zaretskii
2019-05-13 18:08 ` Lars Ingebrigtsen
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=CAA8GjPnVe8xPr6rCTKdL52oBV5sRrwEgfmX0PB8XMUtOxwCwkw@mail.gmail.com \
--to=federicotedin@gmail.com \
--cc=33002@debbugs.gnu.org \
--cc=winston@ml1.net \
/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).