Hi

I love this RFC so we can use it from CLI-SAPI

We can't use sapi_module.read_post() from CLI.

https://github.com/joanhey/AdapterMan
This runtime use the CLI-SAPI, but this SAPI is very limited. We can use parse_str() easily for 'application/x-www-form-urlencoded' but we need to replicate in userland for 'multipart/form-data'.
https://github.com/joanhey/AdapterMan/blob/master/src/Http.php#L410-L416
https://github.com/joanhey/AdapterMan/blob/master/src/ParseMultipart.php


The CLI sapi need more access to internal PHP functions.
Amp, React, Revolt, Workerman, Adapterman, ... use only CLI-SAPI.

Also I created a issue https://github.com/php/php-src/issues/12304

Because the headers functions don't work in CLI. We can override that functions, but later we need an spiral of changes: setcookie, Session, http_response_code, ...


Best regards
Joan Miquel



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to