summaryrefslogtreecommitdiffstats
path: root/modules/uri/uri.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/uri/uri.go')
-rw-r--r--modules/uri/uri.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/uri/uri.go b/modules/uri/uri.go
index 0967a0802f..74410f43f9 100644
--- a/modules/uri/uri.go
+++ b/modules/uri/uri.go
@@ -31,7 +31,10 @@ func Open(uriStr string) (io.ReadCloser, error) {
switch strings.ToLower(u.Scheme) {
case "http", "https":
f, err := http.Get(uriStr)
- return f.Body, err
+ if err != nil {
+ return nil, err
+ }
+ return f.Body, nil
case "file":
return os.Open(u.Path)
default: