mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 23:49:55 +00:00
Force & when creating requests.
Some people will have entities in arg_seperator.output. Make HttpSocket more resiliant. Fixes #3692
This commit is contained in:
parent
30247fd769
commit
cec4e8b758
1 changed files with 2 additions and 2 deletions
|
@ -328,7 +328,7 @@ class HttpSocket extends CakeSocket {
|
||||||
$this->request['auth'] = $this->_auth;
|
$this->request['auth'] = $this->_auth;
|
||||||
|
|
||||||
if (is_array($this->request['body'])) {
|
if (is_array($this->request['body'])) {
|
||||||
$this->request['body'] = http_build_query($this->request['body']);
|
$this->request['body'] = http_build_query($this->request['body'], '', '&');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($this->request['body']) && !isset($this->request['header']['Content-Type'])) {
|
if (!empty($this->request['body']) && !isset($this->request['header']['Content-Type'])) {
|
||||||
|
@ -696,7 +696,7 @@ class HttpSocket extends CakeSocket {
|
||||||
}
|
}
|
||||||
|
|
||||||
$uri['path'] = preg_replace('/^\//', null, $uri['path']);
|
$uri['path'] = preg_replace('/^\//', null, $uri['path']);
|
||||||
$uri['query'] = http_build_query($uri['query']);
|
$uri['query'] = http_build_query($uri['query'], '', '&');
|
||||||
$uri['query'] = rtrim($uri['query'], '=');
|
$uri['query'] = rtrim($uri['query'], '=');
|
||||||
$stripIfEmpty = array(
|
$stripIfEmpty = array(
|
||||||
'query' => '?%query',
|
'query' => '?%query',
|
||||||
|
|
Loading…
Add table
Reference in a new issue