projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64942ca
)
Fix HTTP_ACCEPT_LANGUAGE parsing
author
Jamie Cameron
<jcameron@webmin.com>
Mon, 15 Aug 2011 22:50:29 +0000
(15:50 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Mon, 15 Aug 2011 22:50:29 +0000
(15:50 -0700)
web-lib-funcs.pl
patch
|
blob
|
history
diff --git
a/web-lib-funcs.pl
b/web-lib-funcs.pl
index
83cfb5d
..
33dfbf0
100755
(executable)
--- a/
web-lib-funcs.pl
+++ b/
web-lib-funcs.pl
@@
-4403,6
+4403,7
@@
my @langs = &list_languages();
my $accepted_lang;
if ($gconfig{'acceptlang'}) {
foreach my $a (split(/,/, $ENV{'HTTP_ACCEPT_LANGUAGE'})) {
+ $a =~ s/;.*//; # Remove ;q=0.5 or similar
my ($al) = grep { $_->{'lang'} eq $a } @langs;
if ($al) {
$accepted_lang = $al->{'lang'};