diff --git a/gui/webdisplay/inc/ROOT/RWebDisplayHandle.hxx b/gui/webdisplay/inc/ROOT/RWebDisplayHandle.hxx index 69b0d7e665be8cfd9027dbe6ed501640b3d58e1e..20d1a94ee365a6cc270ddd6284daba0934b8514a 100644 --- a/gui/webdisplay/inc/ROOT/RWebDisplayHandle.hxx +++ b/gui/webdisplay/inc/ROOT/RWebDisplayHandle.hxx @@ -84,7 +84,7 @@ protected: public: - /// Function should return URL for the widget dislpayed - local or http + /// Function should return URL for the widget displayed - local or http using CreateUrlFunc_t = std::function<std::string(bool)>; RWebDisplayHandle(const std::string &url) : fUrl(url) {} diff --git a/gui/webdisplay/src/RWebWindowsManager.cxx b/gui/webdisplay/src/RWebWindowsManager.cxx index 790c6ec708d5f161bfbcfa9b9f154b10b0bc6405..d5ae25a889a1f48effbd8e2a26ca0a0208900765 100644 --- a/gui/webdisplay/src/RWebWindowsManager.cxx +++ b/gui/webdisplay/src/RWebWindowsManager.cxx @@ -378,6 +378,7 @@ std::string ROOT::Experimental::RWebWindowsManager::GetUrl(const ROOT::Experimen /// WebGui.LaunchTmout: time required to start process in seconds (default 30 s) /// WebGui.OperationTmout: time required to perform WebWindow operation like execute command or update drawings /// WebGui.RecordData: if specified enables data recording for each web window 0 - off, 1 - on +/// WebGui.ForceHttp: 0 - off (default), 1 - always create real http server to run web window /// /// Http-server related parameters documented in RWebWindowsManager::CreateServer() method @@ -417,7 +418,11 @@ unsigned ROOT::Experimental::RWebWindowsManager::ShowWindow(ROOT::Experimental:: if (args.GetWidth() <= 0) args.SetWidth(win.GetWidth()); if (args.GetHeight() <= 0) args.SetHeight(win.GetHeight()); - std::string url = GetUrl(win, batch_mode, !args.IsLocalDisplay()); + bool normal_http = !args.IsLocalDisplay(); + if (!normal_http && (gEnv->GetValue("WebGui.ForceHttp",0) == 1)) + normal_http = true; + + std::string url = GetUrl(win, batch_mode, normal_http); if (url.empty()) { R__ERROR_HERE("WebDisplay") << "Cannot create URL for the window"; return 0; @@ -431,7 +436,8 @@ unsigned ROOT::Experimental::RWebWindowsManager::ShowWindow(ROOT::Experimental:: args.SetUrl(url); - args.SetHttpServer(GetServer()); + if (!normal_http) + args.SetHttpServer(GetServer()); auto handle = RWebDisplayHandle::Display(args);