Re: setcookie() minor BC break - fixes issue #67736

From: Date: Sun, 02 Nov 2014 21:38:18 +0000
Subject: Re: setcookie() minor BC break - fixes issue #67736
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-78563@lists.php.net to get a copy of this message
Hi! > The behaviour of PHP is ABSOLUTELY in compliance with the RFC 6265. > Setting two headers may not follow best practice but it is conformant, > and it is only doing what the users PHP script told it to do. I think I agree here - we're providing a low level API, and if somebody uses this API in a manner contrary to best practices, it's on them, but as long as it is not prohibited by the RFC, we should support this behavior in case the users have good reasons to do this. Yes, in 99% of cases it would not be a good reason - that's why it is not the best practice - but as it is not prohibited, there would be valid 1% of cases where it is required by the user. As I see now, the behavior of following user instructions does not break anything, right? It just allows the user to do something that the RFC says he SHOULD NOT do. But I don't think this is a priority to enforce best practices in a low level API, risking breaking BC and causing trouble. If there's a case for higher level API enforcing the best practices, fine, HTTP classes (like pecl/http ones) or frameworks can always handle this. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/

« previous php.internals (#78563) next »