diff options
-rw-r--r-- | module/web/http.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/module/web/http.scm b/module/web/http.scm index aa099feaa..b060af91e 100644 --- a/module/web/http.scm +++ b/module/web/http.scm @@ -1514,7 +1514,15 @@ phrase\"." ;; Expires = HTTP-date ;; -(declare-date-header! "Expires") +(define *date-in-the-past* (parse-date "Thu, 01 Jan 1970 00:00:00 GMT")) + +(declare-header! "Expires" + (lambda (str) + (if (member str '("0" "-1")) + *date-in-the-past* + (parse-date str))) + date? + write-date) ;; Last-Modified = HTTP-date ;; |