summaryrefslogtreecommitdiff
path: root/lib/HttpServ.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/HttpServ.cc')
-rw-r--r--lib/HttpServ.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc
index 1105745..9a59dc2 100644
--- a/lib/HttpServ.cc
+++ b/lib/HttpServ.cc
@@ -359,10 +359,7 @@ void ProcessRequest::SendRedirect(Handle * s) {
"Cache-Control: no-cache" << endhl <<
"Connection: closed" << endhl <<
"Content-Type: text/html" << endhl << endhl <<
- "<HTML><HEAD><TITLE>301 - Moved Permanently</TITLE></HEAD>" << endnl <<
- "<BODY><center><b><h2>You should be redirected to the " << endnl << endnl <<
- "<a href=\"http://" << host << "/bin/start\">start page</a></h2></b></center>" << endnl <<
- "</BODY></HTML>" << endnl;
+ p->GetSkinner()->Redirect("http://" + host + "/bin/start");
}
/*
@@ -391,15 +388,7 @@ void ProcessRequest::SendHeads(Handle * s, const String & mime, const String & e
*/
void ProcessRequest::ShowError(Handle * s) {
- *s << "HTTP/1.1 404 Not Found" << endhl <<
- "Server: " << name << endhl <<
- "Cache-Control: no-cache" << endhl <<
- "Connection: closed" << endhl <<
- "Content-Type: text/html" << endhl << endhl <<
- "<HTML><HEAD><TITLE>404 - Error</TITLE></HEAD>" << endnl <<
- "<BODY><center><b><h2>The server was unable to process your query</h2></b></center>" << endnl <<
- "Click <A HREF=\"/\">here</A> to go the main page." <<
- "</BODY></HTML>" << endnl;
+ *s << p->GetSkinner()->Error("");
}
/*