Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.4.27

- CLI:
. Fixed bug GH-23764 (Built-in server leaks a file descriptor on every HEAD
request for a static file). (Jakub Skopal)

- DOM:
. Fixed use-after-free when re-constructing a DOMXPath whose php:function
registrations are freed while still reachable from the cycle collector.
Expand Down
3 changes: 3 additions & 0 deletions sapi/cli/php_cli_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,9 @@ static zend_result php_cli_server_begin_send_static(php_cli_server *server, php_
client->content_sender_initialized = true;
if (client->request.request_method != PHP_HTTP_HEAD) {
client->file_fd = fd;
} else {
/* Content-Length comes from the stat, the body is never sent. */
close(fd);
}

{
Expand Down
Loading