#31065 [NEW]: HTTP "302" status header contains no description causing failure on clients.

From: Date: Sun, 12 Dec 2004 14:46:08 +0000
Subject: #31065 [NEW]: HTTP "302" status header contains no description causing failure on clients.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-70071@lists.php.net to get a copy of this message
From: glideraerobatics at hotmail dot com Operating system: Linux PHP version: 5.0.2 PHP Bug Type: HTTP related Bug description: HTTP "302" status header contains no description causing failure on clients. 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 bug report at http://bugs.php.net/?id=31065&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31065&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31065&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31065&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31065&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31065&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31065&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31065&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31065&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31065&r=support Expected behavior: http://bugs.php.net/fix.php?id=31065&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31065&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31065&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31065&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31065&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31065&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31065&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31065&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31065&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=31065&r=mysqlcfg

« previous php.bugs (#70071) next »