37 CurlStatOp(handler, url, timeout, logger, response_info, callout, header_callout),
38 m_preferred_cksum(preferred)
50 if (!rv)
return false;
52 curl_easy_setopt(
m_curl.get(), CURLOPT_NOBODY, 1L);
53 curl_easy_setopt(
m_curl.get(), CURLOPT_CUSTOMREQUEST,
nullptr);
64 curl_easy_setopt(
m_curl.get(), CURLOPT_NOBODY, 1L);
65 curl_easy_setopt(
m_curl.get(), CURLOPT_CUSTOMREQUEST,
nullptr);
72 if (
m_curl ==
nullptr)
return;
73 curl_easy_setopt(
m_curl.get(), CURLOPT_HTTPHEADER,
nullptr);
82 auto checksums =
m_headers.GetChecksums();
84 std::array<unsigned char, XrdClHttp::g_max_checksum_length> value;
86 if (checksums.IsSet(m_preferred_cksum)) {
87 value = checksums.Get(m_preferred_cksum);
88 type = m_preferred_cksum;
91 std::tie(type, value, isset) = checksums.GetFirst();
100 std::stringstream ss;
102 ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(value[idx]);
107 buf->FromString(response);
virtual void OptionsDone() override
RedirectAction Redirect(std::string &target) override
void ReleaseHandle() override
CurlChecksumOp(XrdCl::ResponseHandler *handler, const std::string &url, XrdClHttp::ChecksumType preferred, struct timespec timeout, XrdCl::Log *logger, bool response_info, CreateConnCalloutType callout, HeaderCallout *header_callout)
bool Setup(CURL *curl, CurlWorker &) override
void SetDone(bool has_failed)
std::unique_ptr< ResponseInfo > MoveResponseInfo()
std::unique_ptr< CURL, void(*)(CURL *)> m_curl
std::vector< std::pair< std::string, std::string > > m_headers_list
virtual RedirectAction Redirect(std::string &target)
XrdCl::ResponseHandler * m_handler
void ReleaseHandle() override
bool Setup(CURL *curl, CurlWorker &) override
CurlStatOp(XrdCl::ResponseHandler *handler, const std::string &url, struct timespec timeout, XrdCl::Log *log, bool response_info, CreateConnCalloutType callout, HeaderCallout *header_callout)
Binary blob representation.
Handle an async response.
ConnectionCallout *(*)(const std::string &, const ResponseInfo &) CreateConnCalloutType
size_t GetChecksumLength(ChecksumType ctype)
const std::string GetTypeString(ChecksumType ctype)
const uint64_t kLogXrdClHttp
const uint16_t stError
An error occurred that could potentially be retried.
const uint16_t errCheckSumError