53 virtual bool MatchesPath(
const char *verb,
const char *path);
56 virtual int Init(
const char *cfgfile) {
return 0;}
60 static int sockopt_callback(
void * clientp, curl_socket_t curlfd, curlsocktype purpose);
61 static int opensocket_callback(
void *clientp,
63 struct curl_sockaddr *address);
65 static int closesocket_callback(
void *clientp, curl_socket_t fd);
66 static int ssl_ctx_callback(
CURL *curl,
void *ssl_ctx,
void *clientp);
67 static int verify_callback(
int preverify_ok, X509_STORE_CTX* ctx);
72 : bytes_transferred(-1), status(-1), tpc_status(-1), streams(1), isIPv6(false),
73 allow_local(false), allow_private(false), mReq(req), pmarkManager(mReq, tpcType), mTpcType(tpcType)
75 gettimeofday(&begT, 0);
80 std::string log_prefix;
89 std::shared_ptr<X509_STORE> ca_store;
92 off_t bytes_transferred;
116 bool ConfigureCurlCA(
CURL *curl, TPCLogRecord &rec);
119 void ConfigureCurlLowSpeed(
CURL *curl);
122 int RedirectTransfer(
CURL *curl,
const std::string &redirect_resource,
XrdHttpExtReq &req,
125 int OpenWaitStall(
XrdSfsFile &fh,
const std::string &resource,
int mode,
127 const std::string &authz);
130 bool &success, TPCLogRecord &,
bool shouldReturnErrorToClient =
true);
132 int GetContentLengthTPCPull(
CURL *curl,
XrdHttpExtReq &req, uint64_t & contentLength,
bool & success, TPCLogRecord &rec);
139 int SendPerfMarker(
XrdHttpExtReq &req, TPCLogRecord &rec, std::vector<State*> &state,
140 off_t bytes_transferred);
148 size_t streams, TPCLogRecord &rec);
150 size_t streams, std::vector<TPC::State*> &streams_handles,
151 std::vector<ManagedCurlHandle> &curl_handles,
154 int ProcessPushReq(
const std::string & resource,
XrdHttpExtReq &req);
155 int ProcessPullReq(
const std::string &resource,
XrdHttpExtReq &req);
157 bool ConfigureFSLib(
XrdOucStream &Config, std::string &path1,
bool &path1_alt,
158 std::string &path2,
bool &path2_alt);
159 bool Configure(
const char *configfn,
XrdOucEnv *myEnv);
163 void logTransferEvent(LogMask lvl,
const TPCLogRecord &record,
164 const std::string &event,
const std::string &message=
"");
166 std::string generateClientErr(std::stringstream &err_ss,
const TPCLogRecord &rec, CURLcode cCode = CURLcode::CURLE_OK);
170 static int m_marker_period;
171 static size_t m_block_size;
172 static size_t m_small_block_size;
174 bool m_allow_private;
178 long m_low_speed_limit;
179 long m_low_speed_time;
184 std::string m_cafile;
186 static uint64_t m_monid;
189 std::shared_ptr<XrdTlsTempCA> m_ca_file;
194 static const int m_pipelining_multiplier = 16;
198 static bool allowMissingCRL;
203 bool m_sslctx_supported{
false};
207 static const long CONNECT_TIMEOUT = 60;
210 std::map<std::string,std::string> hdr2cgimap;