diff --git a/main.go b/main.go index 528236f..9313fc5 100644 --- a/main.go +++ b/main.go @@ -64,7 +64,9 @@ func wepb2jpg(path string, md5Path string, writer http.ResponseWriter) { resp, getErr := http.Get(path) if getErr != nil { - log.Fatal(getErr) + log.Print(getErr) + writer.WriteHeader(404) + return } endTime := time.Now().UnixNano() @@ -108,6 +110,5 @@ func wepb2jpgHandler(writer http.ResponseWriter, request *http.Request) { if hitCache(md5Path, writer) { return } - wepb2jpg(request.URL.RawQuery, md5Path, writer) }