diff options
author | Unknwon <u@gogs.io> | 2017-02-16 16:33:49 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-16 16:33:49 -0500 |
commit | d521e716dd59617dbbb637a3e8028bf4a5c6f849 (patch) | |
tree | 24ba49f7b169a16c3e1f12ed880bda58a6ac6c58 /modules/context/context.go | |
parent | 3b49a99b6088f2b1e1ba7539b4a69930dfb6de16 (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/context/context.go')
-rw-r--r-- | modules/context/context.go | 2 |
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 } |