![]() |
XRootD
|
#include <XrdTpcUtils.hh>
Static Public Member Functions | |
static std::string | prepareOpenURL (const std::string &reqResource, std::map< std::string, std::string > &reqHeaders, const std::map< std::string, std::string > &hdr2cgimap) |
Definition at line 33 of file XrdTpcUtils.hh.
|
static |
Prepares the file XRootD open URL from the request resource, the xrd-http-query header of the HTTP request and the hdr2cgi map passed in parameter
We first append oss.task=httptpc opaque info. It is therefore guaranteed that after this function is called, at least one opaque info will be part of the full URL. We need to utilize the full URL (including the query string), not just the resource name. The query portion is hidden in the xrd-http-query
header; we take this out and combine it with the resource name. We also append the value of the headers configured in tpc.header2cgi to the resource full URL
One special key is authz
; this is always stripped out and copied to the Authorization header (which will later be used for XrdSecEntity). The latter copy is only done if the Authorization header is not already present.
reqResource | the HTTP request resource |
reqHeaders | HTTP request headers that will be modified to contain what is in the authz opaque query if it was provided |
hdr2cgimap | the map containing header keys --> XRootD cgi mapping |
Definition at line 27 of file XrdTpcUtils.cc.
References XrdOucTUtils::caseInsensitiveFind(), getline(), and TPC::TPCHandler::OSS_TASK_OPAQUE.