Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Force & when creating requests.

Some people will have entities in arg_seperator.output. Make HttpSocket
more resiliant.

Fixes #3692
  • Loading branch information...
commit cec4e8b7583a0259095448d240f496ff18787da7 1 parent 30247fd
@markstory markstory authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Network/Http/HttpSocket.php
View
4 lib/Cake/Network/Http/HttpSocket.php
@@ -328,7 +328,7 @@ public function request($request = array()) {
$this->request['auth'] = $this->_auth;
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'])) {
@@ -696,7 +696,7 @@ protected function _buildUri($uri = array(), $uriTemplate = '%scheme://%user:%pa
}
$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'], '=');
$stripIfEmpty = array(
'query' => '?%query',
Please sign in to comment.
Something went wrong with that request. Please try again.