From d521e716dd59617dbbb637a3e8028bf4a5c6f849 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 16 Feb 2017 16:33:49 -0500 Subject: refactoring: SSH and HTTP push procees is now unified We used to handle SSH and HTTP push separately which produces duplicated code, but now with post-receive hook, the process is unified to one single place and much cleaner. Thus, UpdateTask struct is removed. Narrow down the range of Git HTTP routes to reduce condufsing HTTP Basic Authentication window popup on browser. By detecting inside post-receive hook, Git HTTP doesn't need to read the whole content body anymore, which completely solve the RAM problem reported in #636. --- modules/context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/context/context.go') diff --git a/modules/context/context.go b/modules/context/context.go index e90d5f00..79214856 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -112,7 +112,7 @@ func (ctx *Context) NotFound() { // or error context description for logging purpose of 500 server error. func (ctx *Context) NotFoundOrServerError(title string, errck func(error) bool, err error) { if errck(err) { - ctx.Handle(404, title, err) + ctx.NotFound() return } -- cgit v1.2.3