php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39989 header location doesn't send explanation
Submitted: 2006-12-30 00:24 UTC Modified: 2007-01-07 01:00 UTC
From: Laurent Bigonville <l dot bigonville at edpnet dot Assigned:
Status: No Feedback Package: HTTP related
PHP Version: 5.2.0 OS: Debian Sarge
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Laurent Bigonville <l dot bigonville at edpnet dot
New email:
PHP Version: OS:

 

 [2006-12-30 00:24 UTC] Laurent Bigonville <l dot bigonville at edpnet dot
Description:
------------
the header location doesn't conform to RFC.

The response header must finish with at least a space character.

Reproduce code:
---------------
header("Location: http://url/);

Expected result:
----------------
According to RFC2616 ?6.1 the response message must consist in "HTTP-Version SP Status-Code SP Reason-Phrase CRLF".
(ie HTTP/1.1 302 Found).

Actual result:
--------------
Currently, php send "HTTP/1.1 302" with even no space at the end of the response

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-30 00:33 UTC] l dot bigonville at edpnet dot be
This is odd the problem occurs with the dotdeb packages on sarge but not with debian's official packages on etch..
 [2006-12-30 01:06 UTC] l dot bigonville at edpnet dot be
I think it's because php_cgi return "Status: 302" with no explanation
 [2006-12-30 02:03 UTC] iliaa@php.net
What SAPI are you using?
 [2006-12-30 20:30 UTC] l dot bigonville at edpnet dot be
I use php in cgi mode. The problem seems to come from apache 2.0(.54) not from php.

I'v made an other test using a simple shell script

#! /bin/sh
echo Status: 302
echo

With apache 2.2 it returns HTTP/1.1 302 Found
but with apache 2.0 it returns HTTP/1.1 302

If I change the script to

#! /bin/sh
echo Status: 302
echo

It returns HTTP/1.1 302 Found i both cases
 [2006-12-30 20:31 UTC] l dot bigonville at edpnet dot be
Oups

the last part of the message must read:

If I change the script to

#! /bin/sh
echo Status: 302 Found
echo

It returns HTTP/1.1 302 Found i both cases
 [2006-12-30 22:41 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-01-03 04:18 UTC] l dot bigonville at edpnet dot be
Well this is production server, this could be a little bit complicated...
 [2007-01-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC