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);
84 std::array<unsigned char, XrdClHttp::g_max_checksum_length> value;
85 auto type = XrdClHttp::ChecksumType::kUnknown;
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);
const std::array< unsigned char, g_max_checksum_length > & Get(ChecksumType ctype) const
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< 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
std::unique_ptr< ResponseInfo > MoveResponseInfo()
void ReleaseHandle() override
bool Setup(CURL *curl, CurlWorker &) override
Binary blob representation.
void Error(uint64_t topic, const char *format,...)
Report an error.
Handle an async response.
virtual void HandleResponse(XRootDStatus *status, AnyObject *response)
size_t GetChecksumLength(ChecksumType ctype)
const std::string GetTypeString(ChecksumType ctype)
const uint16_t stError
An error occurred that could potentially be retried.
const uint16_t errCheckSumError
ConnectionCallout *(*)(const std::string &, const ResponseInfo &) CreateConnCalloutType
const uint64_t kLogXrdClHttp