Skip to content

Commit

Permalink
Skip content negotiation if there is no model in the response
Browse files Browse the repository at this point in the history
  • Loading branch information
christeredvartsen committed Aug 26, 2021
1 parent 91911d4 commit e619a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Response/ResponseFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function negotiate(EventInterface $event) {
}

$formatter = $supportedTypes[$mime];
} else {
} else if (null !== $model) {
// Set Vary to Accept since we are doing content negotiation based on Accept
$response->setVary('Accept', false);

Expand Down

0 comments on commit e619a2d

Please sign in to comment.