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);
76 prot->Link->Client(buff,
sizeof(buff));
82 return prot->SecEntity;
92 const char *p =
nullptr;
95 headers[
"xrd-http-query"] = p ? p:
"";
97 headers[
"xrd-http-fullresource"] = p ? p:
"";
98 headers[
"xrd-http-prot"] = prot->isHTTPS()?
"https":
"http";
103 if (prot->SecEntity.moninfo) {
104 clientdn = prot->SecEntity.moninfo;
107 if (prot->SecEntity.host) {
108 clienthost = prot->SecEntity.host;
111 if (prot->SecEntity.vorg) {
112 clientgroups = prot->SecEntity.vorg;
117 pmark = prot->pmarkHandle;
A pragmatic implementation of the HTTP/DAV protocol for the Xrd framework.
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.
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.
const char * c_str() const