|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31065 HTTP "302" status header contains no description causing failure on clients.
Submitted: 2004-12-12 15:46 UTC Modified: 2005-03-08 01:00 UTC
Avg. Score:4.6 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: glideraerobatics at hotmail dot com Assigned:
Status: No Feedback Package: HTTP related
PHP Version: 5.0.2 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-12-12 15:46 UTC] glideraerobatics at hotmail dot com
I've noticed that the browsers in many mobile handsets fail to understand HTTP responses that don't contain a description after the status code.

This is often a problem when using the header('Location: http://somewhere/') function in PHP scripts. This function sets the HTTP status code to 302 so that the client can redirect to the given location. Unfortunately the description "Found" is missing behind that status header so many mobile clients just croak when they recieve the response.

Adding a status description. Just rip them from here:

When it comes to what is not following the HTTP standards exactly in this case, then I think it's PHP as I can't see anywhere that the status description is something optional:

Reproduce code:

Expected result:
HTTP/1.1 302 Found

Actual result:
HTTP/1.1 302


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-12 16:35 UTC]
What SAPI are you using?
 [2004-12-12 21:24 UTC] glideraerobatics at hotmail dot com
I'm using php-cgi called from mod_suphp in Apache 2.
 [2005-02-28 21:17 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-03-08 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".
 [2006-05-18 01:50 UTC] deb dot sites at sbcglobal dot net
I have a similar situation. I am on a windows system, using a dell AXIM running pc windows using the standard IE explorer with cookies on. I, too, cannot seem to get the header:Location to work even though I specify the full link (not relative link). It works fine on my workstations (running windows xp pro - just not on the axim mobile device.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 03:01:28 2024 UTC