Skip to content

Commit

Permalink
Revert "Fix strange bug with allow method"
Browse files Browse the repository at this point in the history
This reverts commit 1cddc9f.
  • Loading branch information
bakura10 committed Oct 31, 2013
1 parent 1cddc9f commit 7adeb99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions src/ZfrRest/Mvc/Controller/MethodHandler/OptionsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

namespace ZfrRest\Mvc\Controller\MethodHandler;

use Zend\Http\Header\Allow;
use Zend\Mvc\Controller\AbstractController;
use Zend\Stdlib\ResponseInterface;
use ZfrRest\Mvc\Controller\MethodHandler\MethodHandlerInterface;
Expand Down Expand Up @@ -58,11 +57,7 @@ public function handleMethod(AbstractController $controller, ResourceInterface $

$response = $controller->getResponse();

$allow = new Allow();
$allow->disallowMethods(array_keys($allow->getAllMethods()));
$allow->allowMethods($allowedMethods);

$response->getHeaders()->addHeader($allow);
$response->getHeaders()->addHeaderLine('Allow', implode(', ', $allowedMethods));
$response->setContent('');
$response->setStatusCode(200);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function testCanPopulateFromControllerOptionsMethod()

$controller->expects($this->once())
->method('options')
->with()
->will($this->returnValue(array('options', 'get', 'put')));

$response = new HttpResponse();
Expand Down

0 comments on commit 7adeb99

Please sign in to comment.