From 6290507be3862fd0bca4d912455f725f3b7b06b3 Mon Sep 17 00:00:00 2001 From: Nathan Osman Date: Tue, 26 Apr 2016 15:18:49 -0700 Subject: [PATCH] Added compatibility with Go 1.5. --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index b2720ef..9b5ae97 100644 --- a/server.go +++ b/server.go @@ -55,7 +55,7 @@ func (s *Server) writeHeaders(w http.ResponseWriter, e *Entry) { // served with the storage backend and every other request is (out of // necessity) rejected since it can't be cached. func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { - if req.Method == http.MethodGet { + if req.Method == "GET" { r, eChan, err := s.cache.GetReader(req.RequestURI) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError)