diff options
author | Anatol Belski <ab@php.net> | 2018-05-13 16:43:22 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-05-13 18:40:32 +0200 |
commit | ad787626a427a2cc49ece694ab6efc63d48df903 (patch) | |
tree | 6d624ec7d0fbbc42f6833dbb1fd3e0dc541f05fa /sapi/cli | |
parent | d21612401f48d862680ba374d2d234bef49c1dc2 (diff) | |
download | php-git-ad787626a427a2cc49ece694ab6efc63d48df903.tar.gz |
Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
Diffstat (limited to 'sapi/cli')
-rw-r--r-- | sapi/cli/php_cli_server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 17c854caad..5844cdfe8e 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -2044,9 +2044,11 @@ static int php_cli_server_begin_send_static(php_cli_server *server, php_cli_serv ' ' == client->request.path_translated[client->request.path_translated_len-1])) { return php_cli_server_send_error_page(server, client, 500); } -#endif + fd = client->request.path_translated ? php_win32_ioutil_open(client->request.path_translated, O_RDONLY): -1; +#else fd = client->request.path_translated ? open(client->request.path_translated, O_RDONLY): -1; +#endif if (fd < 0) { return php_cli_server_send_error_page(server, client, 404); } |