|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-12 16:35 UTC] iliaa@php.net
[2004-12-12 21:24 UTC] glideraerobatics at hotmail dot com
[2005-02-28 21:17 UTC] sniper@php.net
[2005-03-08 01:00 UTC] php-bugs at lists dot php dot net
[2006-05-18 01:50 UTC] deb dot sites at sbcglobal dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
Description: ------------ 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: http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 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: http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 Reproduce code: --------------- header('Location: http://www.php.net'); Expected result: ---------------- HTTP/1.1 302 Found Location: http://www.php.net/ Actual result: -------------- HTTP/1.1 302 Location: http://www.php.net/