Permalink
Browse files

Updated file_info date-checking

  • Loading branch information...
1 parent 4093a69 commit e2a08b21aa9ebd4efe9f9fd7404c4034a59378ab @weavejester weavejester committed Sep 20, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 ring-core/src/ring/middleware/file_info.clj
View
3 ring-core/src/ring/middleware/file_info.clj
@@ -84,7 +84,8 @@
"Has the file been modified since the last request from the client?"
[{headers :headers :as req} last-modified]
(if-let [modified-since (headers "if-modified-since")]
- (= last-modified (.parse (make-http-format) modified-since))))
+ (not (.before (.parse (make-http-format) modified-since)
+ last-modified))))
(defn wrap-file-info
"Wrap an app such that responses with a file a body will have corresponding

0 comments on commit e2a08b2

Please sign in to comment.