diff options
author | Alexander Tkachev | 2016-07-13 00:45:31 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 0a43dad629099505701b14723f1b22ba013a869e (patch) | |
tree | 6a4e6967a913e98986b55ba45268f1e1bf1cf8af /backends/networking/sdl_net/handlers | |
parent | b37b392fa07c5d24fbef2ffe4b4704e8f666f9a1 (diff) | |
download | scummvm-rg350-0a43dad629099505701b14723f1b22ba013a869e.tar.gz scummvm-rg350-0a43dad629099505701b14723f1b22ba013a869e.tar.bz2 scummvm-rg350-0a43dad629099505701b14723f1b22ba013a869e.zip |
CLOUD: Redirect to "/files" from "/"
"/" is used to receive "?code", but when there is no such parameter
passed, it's safe to redirect user to the "/files".
Diffstat (limited to 'backends/networking/sdl_net/handlers')
-rw-r--r-- | backends/networking/sdl_net/handlers/indexpagehandler.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/backends/networking/sdl_net/handlers/indexpagehandler.cpp b/backends/networking/sdl_net/handlers/indexpagehandler.cpp index da5cd2d3f9..9208cd0b15 100644 --- a/backends/networking/sdl_net/handlers/indexpagehandler.cpp +++ b/backends/networking/sdl_net/handlers/indexpagehandler.cpp @@ -35,8 +35,18 @@ IndexPageHandler::~IndexPageHandler() {} void IndexPageHandler::handle(Client &client) { Common::String code = client.queryParameter("code"); - if (code == "") { - HandlerUtils::setMessageHandler(client, _("This is a local webserver index page.")); + if (code == "") { + // redirect to "/files" + HandlerUtils::setMessageHandler( + client, + Common::String::format( + "%s<br/><a href=\"files\">%s</a>", + _("This is a local webserver index page."), + client.queryParameter("path").c_str(), + _("Open Files manager") + ), + "/files" + ); return; } |