Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:122106 php.internals:122107 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80252 invoked from network); 4 Jan 2024 12:08:40 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 4 Jan 2024 12:08:40 -0000 To: internals@lists.php.net,Ilija Tovilo , Message-ID: <66fa7966-f8fd-f767-d2c4-3e176ea68129@kumbiaphp.com> Date: Thu, 4 Jan 2024 13:08:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 37.152.87.60 Subject: Re: [RFC][Under discussion] RFC1867 for non-POST HTTP verbs From: joanhey@kumbiaphp.com (Joanhey) 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