Skip to content

Commit

Permalink
XrdHttp: allow external plug-ins to understand if they are called via…
Browse files Browse the repository at this point in the history
… http or https by defining a special header xrd-http-prot=http|https
  • Loading branch information
apeters1971 committed Jan 11, 2019
1 parent 8ccf0d0 commit 2fd50a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/XrdHttp/XrdHttpExtHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ verb(req->requestverb), headers(req->allheaders) {
int envlen = 0;

headers["xrd-http-query"] = req->opaque?req->opaque->Env(envlen):"";
headers["xrd-http-prot"] = prot->isHTTPS()?"https":"http";

// These fields usually identify the client that connected

Expand Down
3 changes: 3 additions & 0 deletions src/XrdHttp/XrdHttpProtocol.hh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ public:
/// Authentication area
XrdSecEntity SecEntity;

/// called via https
bool isHTTPS() { return ishttps; }

private:


Expand Down

0 comments on commit 2fd50a2

Please sign in to comment.