diff options
author | Unknwon <u@gogs.io> | 2016-07-30 23:39:58 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-30 23:39:58 +0800 |
commit | 10dc33064002f44098668dbd68163aabed6658d3 (patch) | |
tree | acac8b364019e8ec52c42f45ec151bb08d68a11a /routers | |
parent | dfab54d5a2739b3b2a1fe45481c2269d1aeec1a9 (diff) | |
download | gitea-10dc33064002f44098668dbd68163aabed6658d3.tar.gz gitea-10dc33064002f44098668dbd68163aabed6658d3.zip |
#3345 dump content directly to HTTP ResponseWriter
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/commit.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 779fd644d3..4eb37e6bdb 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -195,16 +195,15 @@ func Diff(ctx *context.Context) { } func RawDiff(ctx *context.Context) { - diff, err := models.GetRawDiff( + if err := models.GetRawDiff( models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name), ctx.Params(":sha"), - ctx.Params(":ext"), - ) - if err != nil { - ctx.Handle(404, "GetRawDiff", err) + models.RawDiffType(ctx.Params(":ext")), + ctx.Resp, + ); err != nil { + ctx.Handle(500, "GetRawDiff", err) return } - ctx.HandleText(200, diff) } func CompareDiff(ctx *context.Context) { |