From f08730f193037f364bfd707f880f78d4ee0024f1 Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Tue, 26 Oct 2021 18:59:43 +0200 Subject: [PATCH] Revert "issue #420 return 400 response when Max-Days is too big (#422)" 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)