mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
* HTTPServer.cpp :
* autorefresh for status page * autoreturn to commands list
This commit is contained in:
parent
a62720b9d8
commit
44eccd85fd
@ -755,12 +755,14 @@ namespace http {
|
|||||||
|
|
||||||
// Html5 head start
|
// Html5 head start
|
||||||
ShowPageHead (s);
|
ShowPageHead (s);
|
||||||
if (req.uri.find("page=") != std::string::npos)
|
if (req.uri.find("page=") != std::string::npos) {
|
||||||
HandlePage (req, res, s);
|
HandlePage (req, res, s);
|
||||||
else if (req.uri.find("cmd=") != std::string::npos)
|
} else if (req.uri.find("cmd=") != std::string::npos) {
|
||||||
HandleCommand (req, res, s);
|
HandleCommand (req, res, s);
|
||||||
else
|
} else {
|
||||||
ShowStatus (s);
|
ShowStatus (s);
|
||||||
|
res.add_header("Refresh", "5");
|
||||||
|
}
|
||||||
ShowPageTail (s);
|
ShowPageTail (s);
|
||||||
|
|
||||||
res.code = 200;
|
res.code = 200;
|
||||||
@ -841,7 +843,9 @@ namespace http {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
s << "<b>SUCCESS</b>: Command accepted<br><br>\r\n";
|
s << "<b>SUCCESS</b>: Command accepted<br><br>\r\n";
|
||||||
s << "<a href=\"/?page=commands\">Back to commands list</a>";
|
s << "<a href=\"/?page=commands\">Back to commands list</a><br>\r\n";
|
||||||
|
s << "<p>You will be redirected in 5 seconds</b>";
|
||||||
|
res.add_header("Refresh", "5; url=/?page=commands");
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTTPConnection::SendReply (HTTPRes& reply, std::string& content)
|
void HTTPConnection::SendReply (HTTPRes& reply, std::string& content)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user