From:             epoc_32 at yahoo dot co dot ukXXX
Operating system: FreeBSD 4.8
PHP version:      4.3.8
PHP Bug Type:     Output Control
Bug description:  HTTP  'Content-Language' header gets double value when 'en' is used

Description:
------------
I am using the following line in a script:

   header('Content-Language: '.$PAGE['lang']);

If $PAGE['lang'] is 'no' then the http header gets sent as expected:

   Content-Language: no

However when $PAGE['lang'] is 'en' (and it definately is just 'en' without
any whitespace or uppercase characters) then this gets sent instead:

   Content-Language: en, en

Is this a bug or am I not understanding something? Or maybe something
Apache's doing afterwards? (I have version 1.3.29)

I did some testing and it seems the first 'en' is my string and the second
one is being added if that's of any help.


Reproduce code:
---------------
// English
header('Content-Language: en');

// Norwegian
header('Content-Language: no');


Expected result:
----------------
Content-Language: en
Content-Language: no

Actual result:
--------------
Content-Language: en, en
Content-Language: no

-- 
Edit bug report at http://bugs.php.net/?id=30039&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30039&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30039&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30039&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30039&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30039&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30039&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30039&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30039&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30039&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30039&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30039&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30039&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30039&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30039&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30039&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30039&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30039&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30039&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30039&r=mysqlcfg

Reply via email to