dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8538c7
)
It is valid (albeit silly) to specify lang;q=1.000 No more than three decimals are...
author
Platonides
<platonides@users.mediawiki.org>
Wed, 19 Oct 2011 15:15:08 +0000
(15:15 +0000)
committer
Platonides
<platonides@users.mediawiki.org>
Wed, 19 Oct 2011 15:15:08 +0000
(15:15 +0000)
(rfc2616 section 3.9: Quality Values)
The language-range may contain more than one - (section 14.4) such as x-pig-latin
(section 3.10: Language Tags)
includes/WebRequest.php
patch
|
blob
|
history
diff --git
a/includes/WebRequest.php
b/includes/WebRequest.php
index
2721a5b
..
daab86f
100644
(file)
--- a/
includes/WebRequest.php
+++ b/
includes/WebRequest.php
@@
-962,7
+962,7
@@
HTML;
// Break up string into pieces (languages and q factors)
$lang_parse = null;
- preg_match_all( '/([a-z]{1,8}(-[a-z]{1,8})
?|\*)\s*(;\s*q\s*=\s*(1|0(\.[0-9]+
)?)?)?/',
+ preg_match_all( '/([a-z]{1,8}(-[a-z]{1,8})
*|\*)\s*(;\s*q\s*=\s*(1(\.0{0,3})?|0(\.[0-9]{0,3}
)?)?)?/',
$acceptLang, $lang_parse );
if ( !count( $lang_parse[1] ) ) {