diff --git a/net/http/inc/THttpWSHandler.h b/net/http/inc/THttpWSHandler.h index ddfcef0857ae804c8a9f285107722a4f560b696b..4485e724ffad414fa5ae4e87f33241f6793f1735 100644 --- a/net/http/inc/THttpWSHandler.h +++ b/net/http/inc/THttpWSHandler.h @@ -55,6 +55,10 @@ protected: /// Method used to accept or reject root_batch_holder.js request virtual Bool_t ProcessBatchHolder(std::shared_ptr<THttpCallArg> &) { return kFALSE; } + /// Method called when default page content is prepared for use + /// By default no-cache header is provided + virtual void VerifyDefaultPageContent(std::shared_ptr<THttpCallArg> &arg) { arg->AddNoCacheHeader(); } + public: virtual ~THttpWSHandler(); diff --git a/net/http/src/THttpServer.cxx b/net/http/src/THttpServer.cxx index ee7ff2d4bb9ce3f7b939d507627d9ece175a50ba..8c2bf7453cb447e781ac8410f7058098669b642a 100644 --- a/net/http/src/THttpServer.cxx +++ b/net/http/src/THttpServer.cxx @@ -714,7 +714,7 @@ void THttpServer::ProcessRequest(std::shared_ptr<THttpCallArg> arg) return; } - // this is just to support old Process(), should be deprecated after 6.20 + // this is just to support old Process(THttpCallArg*), should be deprecated after 6.20 fOldProcessSignature = kTRUE; ProcessRequest(arg.get()); if (fOldProcessSignature) { @@ -745,9 +745,10 @@ void THttpServer::ProcessRequest(std::shared_ptr<THttpCallArg> arg) TString resolve; if (!IsFileRequested(fname, resolve)) resolve = fname; arg->fContent = ReadFileContent(resolve.Data()); - arg->AddNoCacheHeader(); } + handler->VerifyDefaultPageContent(arg); + arg->CheckWSPageContent(handler); } }