From 6682090f01a42041950f6dfb5e614ce3a849876d Mon Sep 17 00:00:00 2001 From: Andreas Joachim Peters Date: Mon, 14 Jan 2019 08:36:33 +0100 Subject: [PATCH] XrdHttp: add the used protocol (https/http) as a special header in XrdHttpExtHandler.cc --- src/XrdHttp/XrdHttpExtHandler.cc | 1 + src/XrdHttp/XrdHttpProtocol.hh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/XrdHttp/XrdHttpExtHandler.cc b/src/XrdHttp/XrdHttpExtHandler.cc index ba4ce8dccb5..5a5b6190a0e 100644 --- a/src/XrdHttp/XrdHttpExtHandler.cc +++ b/src/XrdHttp/XrdHttpExtHandler.cc @@ -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 diff --git a/src/XrdHttp/XrdHttpProtocol.hh b/src/XrdHttp/XrdHttpProtocol.hh index 589ca446f53..677fbca974b 100644 --- a/src/XrdHttp/XrdHttpProtocol.hh +++ b/src/XrdHttp/XrdHttpProtocol.hh @@ -124,6 +124,9 @@ public: /// Authentication area XrdSecEntity SecEntity; + /// called via https + bool isHTTPS() { return ishttps; } + private: