Exemplo n.º 1
0
TEST_F(TestWebServer, CanHeadFile)
{
  CCurlFile curl;
  ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML))));

  CheckHtmlTestFileResponse(curl);
}
Exemplo n.º 2
0
bool CFTPDirectory::Exists(const CURL& url)
{
  // make sure ftp dir ends with slash,
  // curl need to known it's a dir to check ftp directory existence.
  std::string file = url.Get();
  URIUtils::AddSlashAtEnd(file);

  CCurlFile ftp;
  CURL url2(file);
  return ftp.Exists(url2);
}
Exemplo n.º 3
0
bool CFTPDirectory::Exists(const char* strPath)
{
  // make sure ftp dir ends with slash,
  // curl need to known it's a dir to check ftp directory existence.
  CStdString file = strPath;
  URIUtils::AddSlashAtEnd(file);

  CCurlFile ftp;
  CURL url(file);
  return ftp.Exists(url);
}
Exemplo n.º 4
0
bool CDAVDirectory::Exists(const CURL& url)
{
  CCurlFile dav;

  // Set the PROPFIND custom request else we may not find folders, depending
  // on the server's configuration
  std::string strRequest = "PROPFIND";
  dav.SetCustomRequest(strRequest);
  dav.SetRequestHeader("depth", 0);

  return dav.Exists(url);
}
Exemplo n.º 5
0
bool CRSSDirectory::Exists(const CURL& url)
{
  CCurlFile rss;
  return rss.Exists(url);
}
Exemplo n.º 6
0
bool CRSSDirectory::Exists(const char* strPath)
{
  CCurlFile rss;
  CURL url(strPath);
  return rss.Exists(url);
}
Exemplo n.º 7
0
TEST_F(TestWebServer, CanNotHeadNonExistingFile)
{
  CCurlFile curl;
  ASSERT_FALSE(curl.Exists(CURL(GetUrlOfTestFile("file_does_not_exist"))));
}
Exemplo n.º 8
0
bool CFTPDirectory::Exists(const char* strPath)
{
  CCurlFile ftp;
  CURL url(strPath);
  return ftp.Exists(url);
}