Re: RFC apache2handler - Added the apache_connection_stream() function for CGI WebSockets
| From: | Robert Landers | Date: | Fri, 26 Apr 2024 14:38:56 +0000 |
| Subject: | Re: RFC apache2handler - Added the apache_connection_stream() function for CGI WebSockets | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123219@lists.php.net to get a copy of this message | ||
On Fri, Apr 26, 2024 at 6:43 AM Richard Miles <richard@miles.systems> wrote:
>
> Howdy everyone,
>
> I’m reaching out in an attempt to start an RFC for the apach2handler module, and I'm
> eager to hear your perspectives. I’ve already created a Draft PR on GitHub
> (https://github.com/php/php-src/pull/14047), and I am ready to move forward with the next steps of
> the proposal (RFC karma/wiki). The current Apache2handler issue is the inability to get user input
> during an HTTP 101 Upgrade request. Current PHP standards require binding to a port and serving all
> connections in a PHP CLI server. In my brief draft, I explain how current io streams function and
> how this solution differs. My change could be a game-changer for shared hosting environments. But
> what's even more exciting is its unexplored potential for normal requests. This could open up a
> whole new world of possibilities. I'm open to further discussion and collaboration to ensure
> its success and get passing tests :)
>
> The function would expose the HTTPD function
>
ap_get_conn_socket; below are the generalized calls.
>
> apr_sock = ap_get_conn_socket(r->connection);
> stream = php_stream_sock_open_from_socket(fd, NULL);
> apr_os_sock_get(&fd, apr_sock)
> php_stream_to_zval(stream, return_value);
>
> Please refer to the PR for the real implementation :) Thanks for your time!
>
>
> PHP Wiki user: WookieeTyler
>
> Best,
>
> Richard Miles
> Miles Systems LLC
> Richard@Miles.Systems
> (817) 789-3294
>
>
>
>
>
> Confidentiality Notice: This email message, including any attachments, is for the sole use of
> the intended recipient(s) and may contain confidential and privileged information. Any unauthorized
> review, use, disclosure, or distribution is prohibited. If you are not the intended recipient,
> please contact the sender by reply email and destroy all copies of the original message.
>
Heh, that's pretty cool that html emails work here, but do note that
it's against the rules (I didn't make the rules, I'm just letting you
know). https://www.php.net/mailing-lists.php
Robert Landers
Software Engineer
Utrecht NL