33#ifndef __XRDHTTPEXTHANDLER_H__
34#define __XRDHTTPEXTHANDLER_H__
56 std::map<std::string, std::string> &
headers;
81 int SendSimpleResp(
int code,
const char *desc,
const char *header_to_add,
const char *body,
long long bodylen);
84 int StartSimpleResp(
int code,
const char *desc,
const char *header_to_add,
long long bodylen,
bool keepalive);
87 int SendData(
const char *body,
int bodylen);
95 int ChunkResp(
const char *body,
long long bodylen);
115 virtual int Init(
const char *cfgfile) = 0;
159#define XrdHttpExtHandlerArgs XrdSysError *eDest, \
XrdHttpExtHandler * XrdHttpGetExtHandler(XrdHttpExtHandlerArgs)
#define XrdHttpExtHandlerArgs
virtual bool MatchesPath(const char *verb, const char *path)=0
Tells if the incoming path is recognized as one of the paths that have to be processed.
XrdHttpExtHandler()
Constructor.
virtual int ProcessReq(XrdHttpExtReq &)=0
virtual ~XrdHttpExtHandler()
Destructor.
virtual int Init(const char *cfgfile)=0
Initializes the external request handler.
int StartSimpleResp(int code, const char *desc, const char *header_to_add, long long bodylen, bool keepalive)
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
std::map< std::string, std::string > mReprDigest
Repr-Digest map where the key is the digest name and the value is the base64 encoded digest value.
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 SendData(const char *body, int bodylen)
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....
std::map< std::string, uint8_t > mWantReprDigest
Want-Repr-Digest map where the key is the digest name and the value is the weighted preference.
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.