[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erw-devel] PEAR HTTP.php
From: |
erw-devel |
Subject: |
[Erw-devel] PEAR HTTP.php |
Date: |
Wed, 16 Jul 2003 11:24:03 +0900 |
In case anyone's doing multilingual apps, you may want to know that
various browsers handle their language settings differently. This
causes problems with using HTTP.php's negotiateLanguage() function.
Specifically, some browsers handle US English thus:
en-us, en-US, EN-US
And not all of these will work -- the function as coded (at least with
my "stock" RH9 system's RPM) does a case _sensitive_ comparison (bad
idea). To handle it "properly" (per RFC), you need a case insensitive
comparison, as provided by the patch below. It's been reported to
PEAR, but never fixed, as far as I know.
diff HTTP.php.orig HTTP.php
80a81
> $supported = array_change_key_case($supported, CASE_LOWER);
89c90
< $l = $accepted[$i];
---
> $l = strtolower($accepted[$i]);
-------------------------------------------------------------
Larry Stanbery, RHCE address@hidden
Network Manager phone: 0985-85-5931
Miyazaki International College http://www.miyazaki-mic.ac.jp
GPG Key ID: 2CEFA662
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erw-devel] PEAR HTTP.php,
erw-devel <=