Thread:Kushieda minori/@comment-220.104.219.161-20190428112036

diff --git a/handler/datahandlers.go b/handler/datahandlers.go index 708760d..9f05a6e 100644 --- a/handler/datahandlers.go +++ b/handler/datahandlers.go @@ -82,7 +82,7 @@ func DecodeHandler(w http.ResponseWriter, r *http.Request) { b := make([]byte, 4) _, err = f.Read(b) f.Close -        if err != nil { +        if err != nil && err != io.EOF { return err }         if bytes.Equal(b, []byte("CODE")) { diff --git a/handler/imagehandlers.go b/handler/imagehandlers.go index 520503f..979437a 100644 --- a/handler/imagehandlers.go +++ b/handler/imagehandlers.go @@ -115,7 +115,7 @@ func servImageDir(w http.ResponseWriter, r *http.Request, urlPath string, root s             b := make([]byte, 4)             _, err = f.Read(b)             f.Close -            if err != nil { +            if err != nil && err != io.EOF {                 return err             }             if bytes.Equal(b, []byte("CODE")) { 