Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into dev

  • Loading branch information...
commit b5e621b77d294bd12f2e7facca651ab02533bafd 2 parents c430137 + 6aee667
@nateabele nateabele authored
View
2  data/Entity.php
@@ -177,7 +177,7 @@ public function &__get($name) {
* @param string $value Property value.
* @return mixed Result.
*/
- public function __set($name, $value = null) {
+ public function __set($name, $value) {
if (is_array($name) && !$value) {
return array_map(array(&$this, '__set'), array_keys($name), array_values($name));
}
View
2  net/http/Response.php
@@ -406,7 +406,7 @@ protected function _httpChunkedDecode($body) {
if (stripos($this->headers('Transfer-Encoding'), 'chunked') === false) {
return $body;
}
- $stream = fopen('data://text/plain,' . $body, 'r');
+ $stream = fopen('data://text/plain;base64,' . base64_encode($body), 'r');
stream_filter_append($stream, 'dechunk');
return trim(stream_get_contents($stream));
}
View
11 tests/cases/net/http/ResponseTest.php
@@ -390,6 +390,17 @@ public function testTransferEncodingChunkedDecode() {
$response = new Response(compact('message'));
$result = $response->body();
$this->assertEqual($expected, $result);
+
+ $expected = '1+1 is 2, 10%40 is 20.';
+ $message = $headers . join("\r\n", array(
+ '22',
+ $expected,
+ '',
+ ));
+
+ $response = new Response(compact('message'));
+ $result = $response->body();
+ $this->assertEqual($expected, $result);
}
public function testTypePriority() {
Please sign in to comment.
Something went wrong with that request. Please try again.