[php-src] PR #23969: sapi/cli: Fix built-in server truncating responses after a partial write
| From: | iliaal | Date: | Mon, 28 Sep 2026 12:42:06 +0000 |
| Subject: | [php-src] PR #23969: sapi/cli: Fix built-in server truncating responses after a partial write | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38883@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23969
Author: iliaal
After a short send() of one chunk, php_cli_server_content_sender_send() went on to the next one. If
that send succeeded, its bytes went out ahead of the remainder and the full-send branch unlinked the
partially sent chunk, so multi-chunk responses such as error pages were cut short, the connection
closed before Content-Length was reached, and the remainder leaked. It now stops at the first
partial write and resumes from that chunk on the next POLLOUT. There is no test, since triggering it
depends on TCP timing.