33 #ifndef __XRDHTTPEXTHANDLER_H__ 34 #define __XRDHTTPEXTHANDLER_H__ 53 std::map<std::string, std::string> &
headers;
65 int SendSimpleResp(
int code,
const char *desc,
const char *header_to_add,
const char *body,
long long bodylen);
73 int ChunkResp(
const char *body,
long long bodylen);
85 virtual bool MatchesPath(
const char *verb,
const char *path) = 0;
93 virtual int Init(
const char *cfgfile) = 0;
137 #define XrdHttpExtHandlerArgs XrdSysError *eDest, \ XrdHttpExtHandler * XrdHttpGetExtHandler(XrdHttpExtHandlerArgs)
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.
virtual int Init(const char *cfgfile)=0
Initializes the external request handler.
const XrdSecEntity & GetSecEntity() const
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. Returns the validity.
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.
Definition: XrdHttpReq.hh:77
virtual ~XrdHttpExtHandler()
Destructor.
Definition: XrdHttpExtHandler.hh:105
XrdHttpProtocol * prot
Definition: XrdHttpExtHandler.hh:47
std::map< std::string, std::string > & headers
Definition: XrdHttpExtHandler.hh:53
int ChunkResp(const char *body, long long bodylen)
Send a (potentially partial) body in a chunked response; invoking with NULL body. ...
Definition: XrdSysError.hh:89
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.
std::string clientgroups
Definition: XrdHttpExtHandler.hh:55
Definition: XrdLink.hh:51
XrdHttpExtReq(XrdHttpReq *req, XrdHttpProtocol *pr)
Definition: XrdOucEnv.hh:41
Definition: XrdHttpExtHandler.hh:79
std::string verb
Definition: XrdHttpExtHandler.hh:52
long long length
Definition: XrdHttpExtHandler.hh:56
std::string clienthost
Definition: XrdHttpExtHandler.hh:55
Definition: XrdHttpProtocol.hh:76
virtual int ProcessReq(XrdHttpExtReq &)=0
std::string resource
Definition: XrdHttpExtHandler.hh:52
#define XrdHttpExtHandlerArgs
Definition: XrdHttpExtHandler.hh:137
Definition: XrdSecEntity.hh:63
Definition: XrdHttpExtHandler.hh:45
std::string clientdn
Definition: XrdHttpExtHandler.hh:55
XrdHttpExtHandler()
Constructor.
Definition: XrdHttpExtHandler.hh:99