aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-16 16:33:49 -0500
committerUnknwon <u@gogs.io>2017-02-16 16:33:49 -0500
commitd521e716dd59617dbbb637a3e8028bf4a5c6f849 (patch)
tree24ba49f7b169a16c3e1f12ed880bda58a6ac6c58 /modules
parent3b49a99b6088f2b1e1ba7539b4a69930dfb6de16 (diff)
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 <old-commit, new-commit, ref-name> 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.
Diffstat (limited to 'modules')
-rw-r--r--modules/context/context.go2
1 files changed, 1 insertions, 1 deletions
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
}