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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC