#31065 [Opn->Fbk]: HTTP "302" status header contains no description causing failure on clients.

From: Date: Sun, 12 Dec 2004 15:35:46 +0000
Subject: #31065 [Opn->Fbk]: HTTP "302" status header contains no description causing failure on clients.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-70079@lists.php.net to get a copy of this message
ID: 31065 Updated by: iliaa@php.net Reported By: glideraerobatics at hotmail dot com -Status: Open +Status: Feedback Bug Type: HTTP related Operating System: Linux PHP Version: 5.0.2 New Comment: What SAPI are you using? Previous Comments: ------------------------------------------------------------------------ [2004-12-12 16:35:29] iliaa@php.net What SAPI are you using? ------------------------------------------------------------------------ [2004-12-12 15:46:06] glideraerobatics at hotmail dot com 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/ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31065&edit=1

« previous php.bugs (#70079) next »