protected function extractFromHeaders($response) {
    $this->setContentType($response->header('Content-Type', $this->contentType()));
    $this->lastModified = strtotime($response->header('Last-Modified', 0));
    $this->etag = $response->header('Etag', $this->etag);
    $this->contentLength = (int) $response->header('Content-Length', 0);

    $this->setDisposition($response->header('Content-Disposition', NULL));
    $this->setEncoding($response->header('Content-Encoding', NULL));

    // Reset the metadata, too:
    $this->setMetadata(Container::extractHeaderAttributes($response->headers()));

    return $this;

  }