예제 #1
0
TEST_F(TestWebServer, CanHeadFile)
{
  CCurlFile curl;
  ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML))));

  CheckHtmlTestFileResponse(curl);
}
예제 #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);
}
예제 #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);
}
예제 #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);
}
예제 #5
0
bool CRSSDirectory::Exists(const CURL& url)
{
  CCurlFile rss;
  return rss.Exists(url);
}
예제 #6
0
bool CRSSDirectory::Exists(const char* strPath)
{
  CCurlFile rss;
  CURL url(strPath);
  return rss.Exists(url);
}
예제 #7
0
TEST_F(TestWebServer, CanNotHeadNonExistingFile)
{
  CCurlFile curl;
  ASSERT_FALSE(curl.Exists(CURL(GetUrlOfTestFile("file_does_not_exist"))));
}
예제 #8
0
bool CFTPDirectory::Exists(const char* strPath)
{
  CCurlFile ftp;
  CURL url(strPath);
  return ftp.Exists(url);
}