Bug->Req #74094 [Opn->Sus]: Too strict checks when using CLI SAPI
Edit report at https://bugs.php.net/bug.php?id=74094&edit=1
ID: 74094
Updated by: cmb@php.net
Reported by: yunosh@php.net
Summary: Too strict checks when using CLI SAPI
-Status: Open
+Status: Suspended
-Type: Bug
+Type: Feature/Change Request
Package: Session related
PHP Version: master-Git-2017-02-13 (Git)
Block user comment: N
Private report: N
New Comment:
> When using the CLI SAPI, it doesn't make sense to implement the
> same strict HTTP header checks like in webserver SAPIs IMO.
Well, what about the built-in Webserver?
> As a consequence, it makes unit testing of session related code
> impossible, because unit testing frameworks usually produce output
> before even running a single test.
What about stubbing/mocking the functions?
Anyhow, I don't regard the current behavior as a bug, and any
possible change would require discussion on the internals mailing
list. If you're still interested in this change, please pursue
the RFC process[1]. For the time being, I suspend this ticket.
Previous Comments:
------------------------------------------------------------------------
[2017-02-21 10:44:18] yunosh@php.net
I wonder if SG(request_info).no_headers should be set to 1 in the CLI SAPI.
------------------------------------------------------------------------
[2017-02-13 18:04:23] yunosh@php.net
This can be seen in real life here: https://travis-ci.org/horde/horde/jobs/201207489#L1860
------------------------------------------------------------------------
[2017-02-13 18:01:26] yunosh@php.net
Description:
------------
When using the CLI SAPI, it doesn't make sense to implement the same strict HTTP header checks
like in webserver SAPIs IMO. There are no headers sent in this case, so the error messages are at
least misleading.
As a consequence, it makes unit testing of session related code impossible, because unit testing
frameworks usually produce output before even running a single test.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74094&edit=1
Thread (4 messages)