52 virtual bool MatchesPath(
const char *verb,
const char *path);
55 virtual int Init(
const char *cfgfile) {
return 0;}
62 TPCLogRecord(
XrdHttpExtReq & req,
const TpcType tpcType) : bytes_transferred( -1 ), status( -1 ),
63 tpc_status(-1), streams( 1 ), isIPv6(
false), mReq(req), pmarkManager(mReq,tpcType), mTpcType(tpcType)
65 gettimeofday(&begT, 0);
69 std::string log_prefix;
76 off_t bytes_transferred;
93 void ConfigureCurlCA(
CURL *curl);
96 int RedirectTransfer(
CURL *curl,
const std::string &redirect_resource,
XrdHttpExtReq &req,
99 int OpenWaitStall(
XrdSfsFile &fh,
const std::string &resource,
int mode,
101 const std::string &authz);
104 bool &success, TPCLogRecord &,
bool shouldReturnErrorToClient =
true);
106 int GetContentLengthTPCPull(
CURL *curl,
XrdHttpExtReq &req, uint64_t & contentLength,
bool & success, TPCLogRecord &rec);
113 int SendPerfMarker(
XrdHttpExtReq &req, TPCLogRecord &rec, std::vector<State*> &state,
114 off_t bytes_transferred);
123 size_t streams, TPCLogRecord &rec);
125 size_t streams, std::vector<TPC::State*> &streams_handles,
126 std::vector<ManagedCurlHandle> &curl_handles,
129 int ProcessPushReq(
const std::string & resource,
XrdHttpExtReq &req);
130 int ProcessPullReq(
const std::string &resource,
XrdHttpExtReq &req);
132 bool ConfigureFSLib(
XrdOucStream &Config, std::string &path1,
bool &path1_alt,
133 std::string &path2,
bool &path2_alt);
134 bool Configure(
const char *configfn,
XrdOucEnv *myEnv);
138 void logTransferEvent(
LogMask lvl,
const TPCLogRecord &record,
139 const std::string &event,
const std::string &message=
"");
141 std::string generateClientErr(std::stringstream &err_ss,
const TPCLogRecord &rec, CURLcode cCode = CURLcode::CURLE_OK);
145 static int m_marker_period;
146 static size_t m_block_size;
147 static size_t m_small_block_size;
155 std::string m_cafile;
157 static uint64_t m_monid;
160 std::shared_ptr<XrdTlsTempCA> m_ca_file;
166 static const int m_pipelining_multiplier = 16;
172 static const long CONNECT_TIMEOUT = 60;
175 std::map<std::string,std::string> hdr2cgimap;