From 038cac6a625602455bf520eb793dd1d20afe75d7 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Mon, 29 Oct 2012 20:59:41 +0100 Subject: [PATCH] The /books/ handler now use the BOOKS_PATH constant --- trantor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trantor.go b/trantor.go index 2ab5037..347ad6d 100644 --- a/trantor.go +++ b/trantor.go @@ -61,7 +61,7 @@ func bookHandler(w http.ResponseWriter, r *http.Request) { } func downloadHandler(w http.ResponseWriter, r *http.Request) { - file := r.URL.Path[1:] + file := BOOKS_PATH + r.URL.Path[len("/books/"):] db.IncDownload(file) http.ServeFile(w, r, file) }