[Pkg-owncloud-commits] [owncloud] 44/172: add test for not failing when adding more comments after type parameters, do not limit x-www-form-urlencoded to POST

David Prévot taffit at moszumanska.debian.org
Sun May 18 20:09:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d8da79cab0838ff9ffb3929a7bf854d8d5dc0797
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date:   Tue May 6 16:58:39 2014 +0200

    add test for not failing when adding more comments after type parameters, do not limit x-www-form-urlencoded to POST
---
 lib/private/appframework/http/dispatcher.php                     | 7 ++-----
 tests/lib/appframework/http/DispatcherTest.php                   | 2 +-
 tests/lib/appframework/utility/ControllerMethodReflectorTest.php | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/private/appframework/http/dispatcher.php b/lib/private/appframework/http/dispatcher.php
index 532e495..9015d65 100644
--- a/lib/private/appframework/http/dispatcher.php
+++ b/lib/private/appframework/http/dispatcher.php
@@ -137,11 +137,8 @@ class Dispatcher {
 				$value === 'false' && 
 				(
 					$this->request->method === 'GET' ||
-					(
-						$this->request->method === 'POST' &&
-						strpos($this->request->getHeader('Content-Type'), 
-								'application/x-www-form-urlencoded') !== false
-					)
+					strpos($this->request->getHeader('Content-Type'), 
+						'application/x-www-form-urlencoded') !== false)
 				)
 			) {
 				$value = false;
diff --git a/tests/lib/appframework/http/DispatcherTest.php b/tests/lib/appframework/http/DispatcherTest.php
index ba1e989..d1296f9 100644
--- a/tests/lib/appframework/http/DispatcherTest.php
+++ b/tests/lib/appframework/http/DispatcherTest.php
@@ -319,7 +319,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
 				'HTTP_ACCEPT' => 'application/text, test',
 				'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
 			),
-			'method' => 'POST'
+			'method' => 'PUT'
 		));
 		$this->dispatcher = new Dispatcher(
 			$this->http, $this->middlewareDispatcher, $this->reflector,
diff --git a/tests/lib/appframework/utility/ControllerMethodReflectorTest.php b/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
index 2a7c003..3659a6b 100644
--- a/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
+++ b/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
@@ -75,7 +75,7 @@ class ControllerMethodReflectorTest extends \PHPUnit_Framework_TestCase {
 
 	/**
 	 * @Annotation
-	 * @param double $test
+	 * @param double $test something special
 	 */
 	public function testReadTypeDoubleAnnotations(){
 		$reader = new ControllerMethodReflector();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list