[php-src] Issue #13697: [ FEATURE REQUEST ] set_setcookie_handler() function

From: Date: Wed, 13 Mar 2024 13:46:38 +0000
Subject: [php-src] Issue #13697: [ FEATURE REQUEST ] set_setcookie_handler() function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246575@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13697 Author: 6562680 ### Description Same as set_error_handler/set_exception_handler Old legacy projects uses setcookie() methods right in place. setcookie() should be called after cookies of current request is normalized. For example - after logout you clear cookies. After login - you put new cookies over cleared before. You have to send new cookies otherwise 502 Bad Gateway on nginx. Yes, could be redesigned all the logic of authorization from scratch but better if you can catch setcookie call and transform it to your response class instead of internal header() call.

« previous php.bugs (#246575) next »