def __ReadDavConfig(self):
        """Reads WebDAV config (server_prefix)."""
        sub_groups = utils.MatchPattern(SearchPushManager.DAV_CONF_PATH,
                                        "^Alias\\s+/search_space\\s+(.*)")
        if sub_groups:
            self.server_prefix = sub_groups[0]

        if not self.server_prefix:
            raise exceptions.SearchPushServeException(
                "Unable to read WebDAV Config.")
        logger.info("Server Prefix: " + self.server_prefix)
 def _ReadPublishRootConfig(self):
   self._allow_symlinks = "N"
   config_path = os.path.join(os.path.dirname(self.server_prefix), ".config")
   try:
     # Older publish roots may not have the .config file so we default to "N".
     if os.path.exists(config_path):
       sub_groups = utils.MatchPattern(
           config_path,
           "^AllowSymLinks:\\s*([YyNn])\\s*$")
       if sub_groups:
         self._allow_symlinks = sub_groups[0]
       else:
         raise exceptions.StreamPushServeException(
             "Invalid Publish root config.")
   finally:
     logger.info("AllowSymlinks: " + self._allow_symlinks)