php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30039 HTTP 'Content-Language' header gets double value when 'en' is used
Submitted: 2004-09-09 15:48 UTC Modified: 2004-09-09 16:08 UTC
From: epoc_32 at yahoo dot co dot ukXXX Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.8 OS: FreeBSD 4.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: epoc_32 at yahoo dot co dot ukXXX
New email:
PHP Version: OS:

 

 [2004-09-09 15:48 UTC] epoc_32 at yahoo dot co dot ukXXX
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-09 16:08 UTC] derick@php.net
PHP doesn't modify this header, so it can't be a bug in PHP. I suspect it's apache playing tricks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 16:01:30 2025 UTC