Subject: p2: Accept-Language missing, empty or no match

From: Mark Nottingham <[email-masked]>
Date: Sat, 20 Apr 2013 18:49:27 +1000

In p2, Accept, Accept-Charset and Accept-Encoding all have language similar to this:

> A request without any Accept header field implies that the user agent will accept any media type in response. If an Accept header field is present in a request and none of the available representations for the response have a media type that is listed as acceptable, the origin server may either honor the Accept header field by sending a 406 (Not Acceptable) response or disregard the Accept header field by treating the response as if it is not subject to content negotiation.

However, Accept-Language in 5.3.5 does not. Is this intentional?

--
Mark Nottingham   http://www.mnot.net/

---

From: Mark Nottingham <[email-masked]>
Date: Mon, 22 Apr 2013 13:48:56 +1000

Now:
  http://trac.tools.ietf.org/wg/httpbis/trac/ticket/448

---

From: Mark Nottingham <[email-masked]>
Date: Tue, 30 Apr 2013 13:22:20 +1000

Anyone disagree with adding similar text to Accept-Language? If not, I'll mark for incorporation.

---

From: James M Snell <[email-masked]>
Date: Mon, 29 Apr 2013 21:06:35 -0700

So long as vary is being used properly still, no objections here.
On Apr 29, 2013 8:24 PM, "Mark Nottingham" <[email-masked]> wrote:

> >> A request without any Accept header field implies that the user agent
> will accept any media type in response. If an Accept header field is
> present in a request and none of the available representations for the
> response have a media type that is listed as acceptable, the origin server
> may either honor the Accept header field by sending a 406 (Not Acceptable)
> response or disregard the Accept header field by treating the response as
> if it is not subject to content negotiation.
> >

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Tue, 30 Apr 2013 12:07:00 +0200

>Anyone disagree with adding similar text to Accept-Language? If not, I'll mark for incorporation.

I certainly disagree with adding text suggesting it's as good an idea to
respond with 406 due to Accept-Language as it is to respond with 406 due
to Accept, Accept-Charset, or Accept-Encoding, the latter all being ca-
pabilities of the user agent, while Accept-Language refers to the user's
education. Back in the day I had to add `*` to my Accept-Language header
to avoid this failure case, which was indeed present on several sites. I
could probably live with noting 406 is okay "somehow", but the text must
be very different from the text for the other headers.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 1 May 2013 10:18:51 +1000

Good point. 

how about:

"""
A request without any Accept-Language header field implies that the user agent will accept any language in response. If an Accept-Language header field is present in a request and none of the available representations for the response have a language tag that is listed as acceptable, the origin server MAY either disregard the Accept header field by treating the response as if it is not subject to content negotiation, or honor the Accept header field by sending a 406 (Not Acceptable) response. However, the latter is not encouraged, as doing so can prevent users from accessing content that they might be able to use (with translation software, for example).
"""

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Wed, 01 May 2013 02:35:57 +0200

* Mark Nottingham wrote:
>Good point. 
>
>how about:
>
>"""
>A request without any Accept-Language header field implies that the user 
>agent will accept any language in response. If an Accept-Language header 
>field is present in a request and none of the available representations 
>for the response have a language tag that is listed as acceptable, the 
>origin server MAY either disregard the Accept header field by treating 
>the response as if it is not subject to content negotiation, or honor 
>the Accept header field by sending a 406 (Not Acceptable) response. 
>However, the latter is not encouraged, as doing so can prevent users 
>from accessing content that they might be able to use (with translation 
>software, for example).
>"""

Two cases of s/Accept/Accept-Language/. "MAY either ... or ..." is bad
usage of RFC 2119 terms. And I don't like the implication that sending
anything other than 406 is "not honoring" the Accept-Language header.
But this is close enough to say "works for me".

Thanks,

---

From: Willy Tarreau <[email-masked]>
Date: Wed, 1 May 2013 08:54:20 +0200

> A request without any Accept-Language header field implies that the user agent will accept any language in response. If an Accept-Language header field is present in a request and none of the avail…

+1.

Willy