public function httpHead(RequestInterface $request, ResponseInterface $response)
    {
        // This is implemented by changing the HEAD request to a GET request,
        // and telling the request handler that is doesn't need to create the body.
        $subRequest = clone $request;
        $subRequest->setMethod('GET');
        $subRequest->setHeader('X-Sabre-Original-Method', 'HEAD');

        try {
            $this->server->invokeMethod($subRequest, $response, false);
        } catch (Exception\NotImplemented $e) {
            // Some clients may do HEAD requests on collections, however, GET
            // requests and HEAD requests _may_ not be defined on a collection,
            // which would trigger a 501.
            // This breaks some clients though, so we're transforming these
            // 501s into 200s.
            $response->setStatus(200);
            $response->setBody('');
            $response->setHeader('Content-Type', 'text/plain');
            $response->setHeader('X-Sabre-Real-Status', $e->getHTTPCode());
        }

        // Sending back false will interrupt the event chain and tell the server
        // we've handled this method.
        return false;
    }