diff --git a/main.go b/main.go index 6e5ffd5..ed5bda4 100644 --- a/main.go +++ b/main.go @@ -94,7 +94,14 @@ func get(w http.ResponseWriter, r *http.Request) { return } - fileServer.ServeHTTP(w, r) + file, err := os.Open(path) + if err != nil { + handleError(w, r, err) + return + } + defer file.Close() + + io.Copy(w, file) } func put(w http.ResponseWriter, r *http.Request) {