20cfece1 by astaxie

Merge pull request #438 from Codonaut/error_page_improvements

Error page improvements
2 parents 480aa521 c433b702
...@@ -185,7 +185,7 @@ func NotFound(rw http.ResponseWriter, r *http.Request) { ...@@ -185,7 +185,7 @@ func NotFound(rw http.ResponseWriter, r *http.Request) {
185 t, _ := template.New("beegoerrortemp").Parse(errtpl) 185 t, _ := template.New("beegoerrortemp").Parse(errtpl)
186 data := make(map[string]interface{}) 186 data := make(map[string]interface{})
187 data["Title"] = "Page Not Found" 187 data["Title"] = "Page Not Found"
188 data["Content"] = template.HTML("<br>The Page You have requested flown the coop." + 188 data["Content"] = template.HTML("<br>The page you have requested has flown the coop." +
189 "<br>Perhaps you are here because:" + 189 "<br>Perhaps you are here because:" +
190 "<br><br><ul>" + 190 "<br><br><ul>" +
191 "<br>The page has moved" + 191 "<br>The page has moved" +
...@@ -203,11 +203,11 @@ func Unauthorized(rw http.ResponseWriter, r *http.Request) { ...@@ -203,11 +203,11 @@ func Unauthorized(rw http.ResponseWriter, r *http.Request) {
203 t, _ := template.New("beegoerrortemp").Parse(errtpl) 203 t, _ := template.New("beegoerrortemp").Parse(errtpl)
204 data := make(map[string]interface{}) 204 data := make(map[string]interface{})
205 data["Title"] = "Unauthorized" 205 data["Title"] = "Unauthorized"
206 data["Content"] = template.HTML("<br>The Page You have requested can't authorized." + 206 data["Content"] = template.HTML("<br>The page you have requested can't be authorized." +
207 "<br>Perhaps you are here because:" + 207 "<br>Perhaps you are here because:" +
208 "<br><br><ul>" + 208 "<br><br><ul>" +
209 "<br>Check the credentials that you supplied" + 209 "<br>The credentials you supplied are incorrect" +
210 "<br>Check the address for errors" + 210 "<br>There are errors in the website address" +
211 "</ul>") 211 "</ul>")
212 data["BeegoVersion"] = VERSION 212 data["BeegoVersion"] = VERSION
213 //rw.WriteHeader(http.StatusUnauthorized) 213 //rw.WriteHeader(http.StatusUnauthorized)
...@@ -219,7 +219,7 @@ func Forbidden(rw http.ResponseWriter, r *http.Request) { ...@@ -219,7 +219,7 @@ func Forbidden(rw http.ResponseWriter, r *http.Request) {
219 t, _ := template.New("beegoerrortemp").Parse(errtpl) 219 t, _ := template.New("beegoerrortemp").Parse(errtpl)
220 data := make(map[string]interface{}) 220 data := make(map[string]interface{})
221 data["Title"] = "Forbidden" 221 data["Title"] = "Forbidden"
222 data["Content"] = template.HTML("<br>The Page You have requested forbidden." + 222 data["Content"] = template.HTML("<br>The page you have requested is forbidden." +
223 "<br>Perhaps you are here because:" + 223 "<br>Perhaps you are here because:" +
224 "<br><br><ul>" + 224 "<br><br><ul>" +
225 "<br>Your address may be blocked" + 225 "<br>Your address may be blocked" +
...@@ -236,7 +236,7 @@ func ServiceUnavailable(rw http.ResponseWriter, r *http.Request) { ...@@ -236,7 +236,7 @@ func ServiceUnavailable(rw http.ResponseWriter, r *http.Request) {
236 t, _ := template.New("beegoerrortemp").Parse(errtpl) 236 t, _ := template.New("beegoerrortemp").Parse(errtpl)
237 data := make(map[string]interface{}) 237 data := make(map[string]interface{})
238 data["Title"] = "Service Unavailable" 238 data["Title"] = "Service Unavailable"
239 data["Content"] = template.HTML("<br>The Page You have requested unavailable." + 239 data["Content"] = template.HTML("<br>The page you have requested is unavailable." +
240 "<br>Perhaps you are here because:" + 240 "<br>Perhaps you are here because:" +
241 "<br><br><ul>" + 241 "<br><br><ul>" +
242 "<br><br>The page is overloaded" + 242 "<br><br>The page is overloaded" +
...@@ -252,11 +252,10 @@ func InternalServerError(rw http.ResponseWriter, r *http.Request) { ...@@ -252,11 +252,10 @@ func InternalServerError(rw http.ResponseWriter, r *http.Request) {
252 t, _ := template.New("beegoerrortemp").Parse(errtpl) 252 t, _ := template.New("beegoerrortemp").Parse(errtpl)
253 data := make(map[string]interface{}) 253 data := make(map[string]interface{})
254 data["Title"] = "Internal Server Error" 254 data["Title"] = "Internal Server Error"
255 data["Content"] = template.HTML("<br>The Page You have requested has down now." + 255 data["Content"] = template.HTML("<br>The page you have requested is down right now." +
256 "<br><br><ul>" + 256 "<br><br><ul>" +
257 "<br>simply try again later" + 257 "<br>Please try again later and report the error to the website administrator" +
258 "<br>you should report the fault to the website administrator" + 258 "<br></ul>")
259 "</ul>")
260 data["BeegoVersion"] = VERSION 259 data["BeegoVersion"] = VERSION
261 //rw.WriteHeader(http.StatusInternalServerError) 260 //rw.WriteHeader(http.StatusInternalServerError)
262 t.Execute(rw, data) 261 t.Execute(rw, data)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!