41 return prot->StartSimpleResp(200, desc, header_to_add, bodylen,
true);
45 return prot->SendData(body, bodylen);
48 return prot->SendSimpleResp(code, desc, header_to_add, body, bodylen,
true);
55 return prot->StartChunkedResp(code, desc, header_to_add, -1,
true);
62 return prot->ChunkResp(body, bodylen);
68 int nb = prot->BuffgetData(blen, data, wait);
87 verb(req->requestverb), headers(req->allheaders) {
92 const char *p =
nullptr;
95 headers[
"xrd-http-query"] = p ? p:
"";
97 headers[
"xrd-http-fullresource"] = p ? p:
"";
A pragmatic implementation of the HTTP/DAV protocol for the Xrd framework.
void trim(std::string &str)
Main request/response class, handling the logical status of the communication.
int ChunkResp(const char *body, long long bodylen)
Send a (potentially partial) body in a chunked response; invoking with NULL body.
XrdHttpExtReq(XrdHttpReq *req, XrdHttpProtocol *pr)
void GetClientID(std::string &clid)
std::map< std::string, std::string > & headers
int StartChunkedResp(int code, const char *desc, const char *header_to_add)
Starts a chunked response; body of request is sent over multiple parts using the SendChunkResp.
int BuffgetData(int blen, char **data, bool wait)
Get a pointer to data read from the client, valid for up to blen bytes from the buffer....
const XrdSecEntity & GetSecEntity() const
int SendSimpleResp(int code, const char *desc, const char *header_to_add, const char *body, long long bodylen)
Sends a basic response. If the length is < 0 then it is calculated internally.
static XrdNetPMark * pmarkHandle
Packet marking handler pointer (assigned from the environment during the Config() call)
XrdLink * Link
The link we are bound to.
bool isHTTPS()
called via https
static bool tpcForwardCreds
If set to true, the HTTP TPC transfers will forward the credentials to redirected hosts.
XrdSecEntity SecEntity
Authentication area.
XrdOucString resource
The resource specified by the request, stripped of opaque data.
XrdOucEnv * opaque
The opaque data, after parsing.
XrdOucString resourceplusopaque
The resource specified by the request, including all the opaque data.
int Client(char *buff, int blen)
const char * c_str() const
char * vorg
Entity's virtual organization(s)
char * moninfo
Information for monitoring.
char * host
Entity's host name dnr dependent.