From 889857a5e3bdf8f81052eacb566fdf9e34055be6 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Fri, 30 Dec 2016 14:08:20 -0500 Subject: [PATCH] Give allowed methods in invalid method response also a typo --- src/Handshake/NegotiatorInterface.php | 2 +- src/Handshake/ServerNegotiator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handshake/NegotiatorInterface.php b/src/Handshake/NegotiatorInterface.php index 662ae95..c152eca 100644 --- a/src/Handshake/NegotiatorInterface.php +++ b/src/Handshake/NegotiatorInterface.php @@ -41,7 +41,7 @@ interface NegotiatorInterface { * @param boolean $enable * @todo Consider extending this interface and moving this there. * The spec does says the server can fail for this reason, but - it is not a requirement. This is an implementation detail. + * it is not a requirement. This is an implementation detail. */ function setStrictSubProtocolCheck($enable); } diff --git a/src/Handshake/ServerNegotiator.php b/src/Handshake/ServerNegotiator.php index f1e0ae0..6568684 100644 --- a/src/Handshake/ServerNegotiator.php +++ b/src/Handshake/ServerNegotiator.php @@ -40,7 +40,7 @@ class ServerNegotiator implements NegotiatorInterface { */ public function handshake(RequestInterface $request) { if (true !== $this->verifier->verifyMethod($request->getMethod())) { - return new Response(405); + return new Response(405, ['Allow' => 'GET']); } if (true !== $this->verifier->verifyHTTPVersion($request->getProtocolVersion())) {