+ $response = $server->getResponse();
+ if (!count($response->getParameters())) {
+ // We get an empty response if we don't get any auth header. Let's actually note that explicitly.
+ $response->setError($response->getStatusCode(), 'auth_missing', 'Authentication missing');
+ }
+ $response->send();