File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ public function matchesPath(string $requestPath):bool {
7676 }
7777
7878 public function matchesAccept (string $ acceptHeader ):bool {
79+ if (!$ acceptHeader ) {
80+ $ acceptHeader = "*/* " ;
81+ }
82+
7983 $ acceptArgument = $ this ->attribute ->getArguments ()["accept " ] ?? null ;
8084 if (is_null ($ acceptArgument )) {
8185 return true ;
@@ -112,6 +116,9 @@ public function getAcceptedTypes(string $acceptHeader = ""):array {
112116 }
113117
114118 public function getBestNegotiation (string $ acceptHeader ):?Accept {
119+ if (!$ acceptHeader ) {
120+ $ acceptHeader = "*/* " ;
121+ }
115122 /** @var Accept $mediaType */
116123 /** @noinspection PhpUnnecessaryLocalVariableInspection */
117124 $ mediaType = $ this ->negotiator ->getBest (
You can’t perform that action at this time.
0 commit comments