6#ifndef __XRD_TPC_STATE_HH__
7#define __XRD_TPC_STATE_HH__
37 m_recv_status_line(false),
38 m_recv_all_headers(false),
47 m_is_transfer_state(true)
58 m_recv_status_line(false),
59 m_recv_all_headers(false),
69 m_is_transfer_state(false),
70 tpcForwardCreds(tpcForwardCreds)
72 InstallHandlers(curl);
78 State (off_t start_offset,
Stream &stream,
CURL *curl,
bool push,
bool tpcForwardCreds) :
80 m_recv_status_line(false),
81 m_recv_all_headers(false),
83 m_start_offset(start_offset),
91 m_is_transfer_state(true),
92 tpcForwardCreds(tpcForwardCreds)
94 InstallHandlers(curl);
111 const std::map<std::string, std::string> &
GetReprDigest()
const {
return m_repr_digests; }
177 bool InstallHandlers(
CURL *curl);
182 void RecordFinalizeError(
int error_code,
const std::string &error_msg);
189 static size_t HeaderCB(
char *buffer,
size_t size,
size_t nitems,
191 int Header(
const std::string &header);
192 static size_t WriteCB(
void *buffer,
size_t size,
size_t nitems,
void *userdata);
193 ssize_t Write(
char *buffer,
size_t size);
198 static size_t PushRespCB(
void *buffer,
size_t size,
size_t nitems,
void *userdata);
199 static size_t ReadCB(
void *buffer,
size_t size,
size_t nitems,
void *userdata);
200 int Read(
char *buffer,
size_t size);
203 bool m_recv_status_line;
204 bool m_recv_all_headers;
206 off_t m_start_offset;
209 off_t m_content_length;
213 struct curl_slist *m_headers;
214 std::vector<std::string> m_headers_copy;
215 std::string m_resp_protocol;
216 std::string m_error_buf;
217 int m_finalize_error_code = 0;
218 std::string m_finalize_error_buf;
219 bool m_is_transfer_state;
220 bool tpcForwardCreds =
false;
221 std::map<std::string, std::string> m_repr_digests;
const std::map< std::string, std::string > & GetReprDigest() const
State(off_t start_offset, Stream &stream, CURL *curl, bool push, bool tpcForwardCreds)
int GetFinalizeErrorCode() const
int GetStatusCode() const
off_t BytesTransferred() const
bool BodyTransferInProgress() const
void SetErrorMessage(const std::string &error_msg)
void SetTransferParameters(off_t offset, size_t size)
std::string GetFinalizeErrorMessage() const
std::string GetErrorMessage() const
std::string GetConnectionDescription()
void SetupHeaders(XrdHttpExtReq &req)
void SetContentLength(const off_t content_length)
off_t GetContentLength() const
void SetErrorCode(int error_code)
State(CURL *curl, bool tpcForwardCreds)
void SetupHeadersForHEAD(XrdHttpExtReq &req)
int AvailableBuffers() const