From 27c2dcf60e60617e28d34176393394aef3fa240c Mon Sep 17 00:00:00 2001
From: Florian / sinnlosername <sinnlosername@users.noreply.github.com>
Date: Sun, 30 Jul 2017 16:32:10 +0200
Subject: [PATCH] Fixed robots.txt 404 error (#2226)

* Update routes.go

* Update routes.go
---
 routers/routes/routes.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index 096daad8e..a7a759538 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -651,7 +651,7 @@ func RegisterRoutes(m *macaron.Macaron) {
 		if setting.HasRobotsTxt {
 			ctx.ServeFileContent(path.Join(setting.CustomPath, "robots.txt"))
 		} else {
-			ctx.Error(404)
+			ctx.Handle(404, "", nil)
 		}
 	})