34 CurlStatOp(handler, url, timeout, logger, response_info, callout, header_callout),
41 curl_easy_setopt(
m_curl.get(), CURLOPT_OPENSOCKETFUNCTION,
nullptr);
42 curl_easy_setopt(
m_curl.get(), CURLOPT_OPENSOCKETDATA,
nullptr);
43 curl_easy_setopt(
m_curl.get(), CURLOPT_SOCKOPTFUNCTION,
nullptr);
44 curl_easy_setopt(
m_curl.get(), CURLOPT_SOCKOPTDATA,
nullptr);
49CurlOpenOp::SetOpenProperties(
bool setSize)
52 curl_easy_getinfo(
m_curl.get(), CURLINFO_EFFECTIVE_URL, &url);
59 if (!isdir && size >= 0) {
60 m_file->
SetProperty(
"XrdClHttpPrefetchSize", std::to_string(size));
67 m_file->SetProperty(
"ETag", etag);
69 m_file->SetProperty(
"Cache-Control",
m_headers.GetCacheControl());
76 SetOpenProperties(
true);
84 m_file->SetProperty(
"ContentLength", std::to_string(size));
96 SetOpenProperties(
false);
97 m_file->SetProperty(
"ContentLength",
"0");
107 m_first_pause =
false;
116 curl_easy_getinfo(
m_curl.get(), CURLINFO_EFFECTIVE_URL, &url);
118 m_file.SetProperty(
"LastURL", url);
121 auto length =
m_headers.GetContentLength();
122 m_file.SetProperty(
"XrdClHttpPrefetchSize", std::to_string(length));
127 m_file.SetProperty(
"ETag", etag);
129 m_file.SetProperty(
"Cache-Control",
m_headers.GetCacheControl());
void ReleaseHandle() override
void Fail(uint16_t errCode, uint32_t errNum, const std::string &) override
CurlOpenOp(XrdCl::ResponseHandler *handler, const std::string &url, struct timespec timeout, XrdCl::Log *logger, XrdClHttp::File *file, bool response_info, CreateConnCalloutType callout, HeaderCallout *header_callout)
void SetDone(bool has_failed)
std::unique_ptr< CURL, void(*)(CURL *)> m_curl
virtual void Pause() override
void ReleaseHandle() override
void SuccessImpl(bool returnObj)
std::pair< int64_t, bool > GetStatInfo()
CurlStatOp(XrdCl::ResponseHandler *handler, const std::string &url, struct timespec timeout, XrdCl::Log *log, bool response_info, CreateConnCalloutType callout, HeaderCallout *header_callout)
virtual bool SetProperty(const std::string &name, const std::string &value) override
Handle an async response.
ConnectionCallout *(*)(const std::string &, const ResponseInfo &) CreateConnCalloutType
const uint64_t kLogXrdClHttp
const uint16_t errErrorResponse
@ Write
Open only for writing.