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);
49 CurlOpenOp::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));
76 SetOpenProperties(
true);
84 m_file->
SetProperty(
"ContentLength", std::to_string(size));
96 SetOpenProperties(
false);
107 m_first_pause =
false;
116 curl_easy_getinfo(
m_curl.get(), CURLINFO_EFFECTIVE_URL, &url);
122 m_file.
SetProperty(
"XrdClHttpPrefetchSize", std::to_string(length));
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 Fail(uint16_t errCode, uint32_t errNum, const std::string &)
virtual void Pause() override
void ReleaseHandle() override
void SuccessImpl(bool returnObj)
std::pair< int64_t, bool > GetStatInfo()
XrdCl::OpenFlags::Flags Flags() const
virtual bool SetProperty(const std::string &name, const std::string &value) override
void Error(uint64_t topic, const char *format,...)
Report an error.
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
Handle an async response.
const uint16_t errErrorResponse
ConnectionCallout *(*)(const std::string &, const ResponseInfo &) CreateConnCalloutType
const uint64_t kLogXrdClHttp
@ Write
Open only for writing.