public function content() {
    $out = '';

    // XXX: The addition of the Content-Length check is a workaround
    // for an issue with using PHP Stream Wrappers to communicate with
    // Identity Service. Apparently, the remote does not provide
    // an EOF marker, and PHP is too dumb to truncate at Content-Length,
    // so we have to do it manually.
    $max = $this->header('Content-Length', NULL);
    if (isset($this->metadata['unread_bytes']) && isset($max)) {
      while (!feof($this->handle) && strlen($out) < $max) {
        $out .= fread($this->handle, 8192);
      }
    }
    else {
      // XXX: This works fine with CURL, but will not
      // work with PHP HTTP Stream Wrapper b/c the
      // wrapper has a bug that will cause this to
      // hang.
      $out = stream_get_contents($this->handle);
    }

    // Should we close or rewind?
    // Cannot rewind PHP HTTP streams.
    fclose($this->handle);
    //rewind($this->handle);

    return $out;
  }