Accept-Language settings do not offer to include "*" for any language



15 years ago
10 years ago


(Reporter: Matthias Wimmer, Unassigned)


Firefox Tracking Flags

(Not tracked)



(1 obsolete attachment)



15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4) Gecko/20030827 Debian/1.4-3
Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4) Gecko/20030827 Debian/1.4-3

As far as I understand RFC 2616 defines as valid token for languages "*" as well
that will match any language. It would be sometimes very useful to have "*" as
last prefered language. Especially it would be good for the default
configuration to not only accept English but only prefere English and accept any
language ("en, *").
For the user interface I would suggest that this could be a checkbox "accept
only these languages", if it is disabled "*" will be added as last language, if
it is enabled it won't be added.

Reproducible: Always

Steps to Reproduce:

Comment 1

15 years ago
RFC2616 does indeed mention that '*' is a valid entry too, see

I couldn't find bug that talked about this issue, though.

I was able to add a '*' language in build 2003090703 on Mac OS X 10.2.6, by
editting the intl.accept_languages preference directly (with about:config). The
entry was sent correctly in the headers. But it wasn't possible when the GUI (*
is not a valid language code). The responsible code is the IsRFC1766LangTag()
function at
Ever confirmed: true

Comment 2

15 years ago
Created attachment 131037 [details] [diff] [review]
Simple patch

this is just an simple if-check, but should be enough for this case (no very
very high-performance needed here i think :). But we need to add some
descriptions for this language token (or add it to the language list, because
in prefs you only see [*]). Comments to this?

Comment 3

15 years ago
Assignee: bugs → mcsmurf

Comment 4

15 years ago
Comment on attachment 131037 [details] [diff] [review]
Simple patch

this patch doesn't work; when i enter *, click ok, open prefs again this is
gone; according to about:config it doesn't save the *
Attachment #131037 - Attachment is obsolete: true

Comment 5

15 years ago
+  if (candidate = "*") return true;
Well, it has to be a == ofcourse ...

I noticed that when I have a entry with a '*' (added by hand), it was removed
when I was adding another entry to the list (in the GUI). I guess there's
another check somewhere else. I'll try to look for it tonight.

Comment 6

15 years ago
Well still doesn't work with this, because of some check in Line 518 and
following. I would rather do a checkbox "Accept all languages, when none of the
above matches"

Comment 7

15 years ago
feel free to take this, not enugh time for this
Assignee: mcsmurf → bugs
Mass reassign of my non-Firefox bugs to
Assignee: bugs → ben_seamonkey
Product: Browser → Seamonkey
Assignee: ben_seamonkey → prefs
QA Contact: bugzilla
(Filter "spam" on 'prefs-nobody-20080612'.)
Assignee: prefs → nobody
QA Contact: prefs
You need to log in before you can comment on or make changes to this bug.