From 14dc0cfcab678fafd5774d33884a40d5a5972421 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 29 Nov 2011 18:33:32 -0800 Subject: =?UTF-8?q?Making=20things=20a=20bit=20more=20pretty:=20-)=20Using?= =?UTF-8?q?=20an=20actual=20embedded=20style=20sheet=20within=20the=20erro?= =?UTF-8?q?r=20document=20(serifs=20are=20evil)=20-)=20Changing=20the=20ug?= =?UTF-8?q?ly=20`'=20into=20`=C2=B4,=20at=20least=20for=20the=20HTML=20out?= =?UTF-8?q?put.=20-)=20Adding=20the=20title=20into=20the=20error=20page.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/HttpServer.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/HttpServer.cc') diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 3526a2a..ac479ff 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -45,7 +45,7 @@ class HttpWorker : public Task { void sendError(int error, const char * msg, bool closeConnection, std::vector trace); void send400() { std::vector d2; sendError(400, "The HTTP request you've sent is invalid", true, d2); } void send404() { std::vector d2; sendError(404, "The HTTP request you've sent didn't match any action on this server.", false, d2); } - void send500(const char * msg, std::vector trace) { String smsg; smsg.set("The HTTP request you've sent triggered an internal error: `%s'", msg); sendError(500, smsg.to_charp(), true, trace); } + void send500(const char * msg, std::vector trace) { String smsg; smsg.set("The HTTP request you've sent triggered an internal error: `%s\xc2\xb4", msg); sendError(500, smsg.to_charp(), true, trace); } String httpUnescape(const char * in); void readVariables(Http::StringMap & variables, char * str); @@ -77,12 +77,16 @@ const Balau::String SetDefaultTemplate::m_defaultErrorTemplate( " \n" " \n" " {{title}}\n" +" \n" " \n" "\n" " \n" -"

{{msg}}

\n" +"

{{title}}

\n" +"

{{msg}}

\n" "{{#hasTrace}}\n" -"

Context:

\n" +"

Context:

\n" " {{#trace}}
{{line}}
{{/trace}}
\n" "{{/hasTrace}}\n" " \n" -- cgit v1.2.3