From fa74be02d293748b82cc8053da75096f2e3b3f22 Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Tue, 26 Oct 2021 19:03:51 +0200 Subject: [PATCH] Revert "issue #420 return 400 response when Max-Days is too big (#422)" (#426) This reverts commit 2959fc2992e873a081dc0c6ddca6b926756cdee5. --- server/handlers.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/server/handlers.go b/server/handlers.go index eeacaa7..a31e29c 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -533,10 +533,6 @@ func (s *Server) putHandler(w http.ResponseWriter, r *http.Request) { s.logger.Printf("%s", err.Error()) http.Error(w, errors.New("Could not encode metadata").Error(), 500) return - } else if time.Now().After(metadata.MaxDate) { - s.logger.Print("Invalid MaxDate") - http.Error(w, errors.New("Invalid MaxDate, make sure Max-Days is smaller than 290 years").Error(), 400) - return } else if err := s.storage.Put(token, fmt.Sprintf("%s.metadata", filename), buffer, "text/json", uint64(buffer.Len())); err != nil { s.logger.Printf("%s", err.Error()) http.Error(w, errors.New("Could not save metadata").Error(), 500)