Req #74535 [NEW]: please warn users when implicit Location: HTTP status override triggers

From: Date: Wed, 03 May 2017 13:27:35 +0000
Subject: Req #74535 [NEW]: please warn users when implicit Location: HTTP status override triggers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208939@lists.php.net to get a copy of this message
From: joy+php at entuzijast dot net Operating system: PHP version: Irrelevant Package: HTTP related Bug Type: Feature/Change Request Bug description:please warn users when implicit Location: HTTP status override triggers Description: ------------ Hi, An aspect of this bug was previously reported at https://bugs.php.net/bug.php?id=70273 When you run: header("HTTP/1.1 202 Accepted"); header("Location: whatever"); ...this second header will invoke the function which will replace the user-defined status code (202 in this example) with a 302. This is fine, as it is conformant to RFC 2616, but there should really be a warning emitted in the logs to tell the user that their input was explicitly ignored. For example, say "PHP Warning: Location header incompatible with HTTP/1.1 202 Accepted, falling back to HTTP/1.1 302 Found" TIA. -- Edit bug report at https://bugs.php.net/bug.php?id=74535&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74535&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74535&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74535&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74535&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74535&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74535&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74535&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74535&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74535&r=support Expected behavior: https://bugs.php.net/fix.php?id=74535&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74535&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74535&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74535&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74535&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74535&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74535&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74535&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74535&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74535&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74535&r=mysqlcfg

« previous php.bugs (#208939) next »