aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/view.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index fdb8d5f136..25d40c34d8 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -10,6 +10,7 @@ import (
"encoding/base64"
"fmt"
gotemplate "html/template"
+ "io"
"io/ioutil"
"net/url"
"path"
@@ -435,7 +436,9 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
buf = make([]byte, 1024)
n, err = dataRc.Read(buf)
- if err != nil {
+ // Error EOF don't mean there is an error, it just means we read to
+ // the end
+ if err != nil && err != io.EOF {
ctx.ServerError("Data", err)
return
}