Commit 9da759a
committed
Fix GH-23764: Built-in server leaks fd on HEAD request for static file
php_cli_server_begin_send_static() opens the file, but for HEAD requests
never stores the descriptor in client->file_fd, so nothing closes it.
Close it right away; Content-Length comes from the stat and the body is
never sent, so the descriptor is not needed.1 parent 9c2acc3 commit 9da759a
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2185 | 2185 | | |
2186 | 2186 | | |
2187 | 2187 | | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
2188 | 2191 | | |
2189 | 2192 | | |
2190 | 2193 | | |
| |||
0 commit comments