Give allowed methods in invalid method response
also a typo
This commit is contained in:
parent
ee3233ef5e
commit
889857a5e3
@ -41,7 +41,7 @@ interface NegotiatorInterface {
|
|||||||
* @param boolean $enable
|
* @param boolean $enable
|
||||||
* @todo Consider extending this interface and moving this there.
|
* @todo Consider extending this interface and moving this there.
|
||||||
* The spec does says the server can fail for this reason, but
|
* 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);
|
function setStrictSubProtocolCheck($enable);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class ServerNegotiator implements NegotiatorInterface {
|
|||||||
*/
|
*/
|
||||||
public function handshake(RequestInterface $request) {
|
public function handshake(RequestInterface $request) {
|
||||||
if (true !== $this->verifier->verifyMethod($request->getMethod())) {
|
if (true !== $this->verifier->verifyMethod($request->getMethod())) {
|
||||||
return new Response(405);
|
return new Response(405, ['Allow' => 'GET']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (true !== $this->verifier->verifyHTTPVersion($request->getProtocolVersion())) {
|
if (true !== $this->verifier->verifyHTTPVersion($request->getProtocolVersion())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user