From f27c9fd4390dac768128e8350cad9cb6d70872b6 Mon Sep 17 00:00:00 2001 From: Max Brosnahan Date: Tue, 8 Dec 2015 09:10:49 +1300 Subject: [PATCH] Remove dependency on pat for id extraction --- unrouted_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unrouted_handler.go b/unrouted_handler.go index 81d7d0b..47dfc64 100644 --- a/unrouted_handler.go +++ b/unrouted_handler.go @@ -254,7 +254,7 @@ func (handler *UnroutedHandler) PostFile(w http.ResponseWriter, r *http.Request) // HeadFile returns the length and offset for the HEAD request func (handler *UnroutedHandler) HeadFile(w http.ResponseWriter, r *http.Request) { - id := r.URL.Query().Get(":id") + id := extractIDFromPath(r.URL.Path) info, err := handler.dataStore.GetInfo(id) if err != nil { handler.sendError(w, r, err)