Added compatibility with Go 1.5.

This commit is contained in:
Nathan Osman 2016-04-26 15:18:49 -07:00
parent c206736195
commit 6290507be3

View File

@ -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)