|
@ -11,7 +11,7 @@ class Versions implements \JKingWeb\Arsse\REST\Handler { |
|
|
public function dispatch(\JKingWeb\Arsse\REST\Request $req): Response { |
|
|
public function dispatch(\JKingWeb\Arsse\REST\Request $req): Response { |
|
|
// if a method other than GET was used, this is an error |
|
|
// if a method other than GET was used, this is an error |
|
|
if ($req->method != "GET") { |
|
|
if ($req->method != "GET") { |
|
|
return new Response(405); |
|
|
return new Response(405, "", "", ["Allow: GET"]); |
|
|
} |
|
|
} |
|
|
if (preg_match("<^/?$>", $req->path)) { |
|
|
if (preg_match("<^/?$>", $req->path)) { |
|
|
// if the request path is an empty string or just a slash, return the supported versions |
|
|
// if the request path is an empty string or just a slash, return the supported versions |
|
|