25 m_recv_status_line(false),
26 m_recv_all_headers(false),
35 m_is_transfer_state(true)
44 m_recv_status_line(false),
45 m_recv_all_headers(false),
54 m_is_transfer_state(false),
55 tpcForwardCreds(tpcForwardCreds)
57 InstallHandlers(curl);
63 State (off_t start_offset,
Stream &stream,
CURL *curl,
bool push,
bool tpcForwardCreds) :
65 m_recv_status_line(false),
66 m_recv_all_headers(false),
68 m_start_offset(start_offset),
75 m_is_transfer_state(true),
76 tpcForwardCreds(tpcForwardCreds)
78 InstallHandlers(curl);
142 bool InstallHandlers(
CURL *curl);
149 static size_t HeaderCB(
char *buffer,
size_t size,
size_t nitems,
151 int Header(
const std::string &header);
152 static size_t WriteCB(
void *buffer,
size_t size,
size_t nitems,
void *userdata);
153 ssize_t Write(
char *buffer,
size_t size);
154 static size_t ReadCB(
void *buffer,
size_t size,
size_t nitems,
void *userdata);
155 int Read(
char *buffer,
size_t size);
158 bool m_recv_status_line;
159 bool m_recv_all_headers;
161 off_t m_start_offset;
164 off_t m_content_length;
167 struct curl_slist *m_headers;
168 std::vector<std::string> m_headers_copy;
169 std::string m_resp_protocol;
170 std::string m_error_buf;
171 bool m_is_transfer_state;
172 bool tpcForwardCreds =
false;
State(off_t start_offset, Stream &stream, CURL *curl, bool push, bool tpcForwardCreds)
int GetStatusCode() const
off_t BytesTransferred() const
void CopyHeaders(XrdHttpExtReq &req)
bool BodyTransferInProgress() const
void SetErrorMessage(const std::string &error_msg)
void SetTransferParameters(off_t offset, size_t size)
std::string GetErrorMessage() const
std::string GetConnectionDescription()
off_t GetContentLength() const
void SetErrorCode(int error_code)
State(CURL *curl, bool tpcForwardCreds)
int AvailableBuffers() const