mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Merge branch 'PHP-5.6'
* PHP-5.6: Fix #68291: 404 on urls with '+' Resolved conflicts: sapi/cli/php_cli_server.c
This commit is contained in:
commit
cc9da62bdb
@ -94,7 +94,7 @@
|
||||
#include "ext/standard/file.h" /* for php_set_sock_blocking() :-( */
|
||||
#include "zend_smart_str.h"
|
||||
#include "ext/standard/html.h"
|
||||
#include "ext/standard/url.h" /* for php_url_decode() */
|
||||
#include "ext/standard/url.h" /* for php_raw_url_decode() */
|
||||
#include "ext/standard/php_string.h" /* for php_dirname() */
|
||||
#include "php_network.h"
|
||||
|
||||
@ -1467,7 +1467,7 @@ static void normalize_vpath(char **retval, size_t *retval_len, const char *vpath
|
||||
return;
|
||||
}
|
||||
|
||||
decoded_vpath_end = decoded_vpath + php_url_decode(decoded_vpath, (int)vpath_len);
|
||||
decoded_vpath_end = decoded_vpath + php_raw_url_decode(decoded_vpath, (int)vpath_len);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
{
|
||||
|
21
sapi/cli/tests/bug68291.phpt
Normal file
21
sapi/cli/tests/bug68291.phpt
Normal file
@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #68291 (404 on urls with '+')
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
include "php_cli_server.inc";
|
||||
file_put_contents(__DIR__ . '/bug68291+test.html', 'Found');
|
||||
php_cli_server_start(NULL, NULL);
|
||||
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/bug68291+test.html');
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(__DIR__ . '/bug68291+test.html');
|
||||
?>
|
||||
--EXPECT--
|
||||
Found
|
Loading…
Reference in New Issue
Block a user