USING: calendar io io.files kernel math math.order\r
math.parser namespaces parser sequences strings\r
assocs hashtables debugger mime-types sorting logging\r
-calendar.format accessors\r
+calendar.format accessors splitting\r
io.encodings.binary fry xml.entities destructors urls\r
html.elements html.templates.fhtml\r
http\r
\r
TUPLE: file-responder root hook special allow-listings ;\r
\r
+: modified-since ( request -- date )\r
+ "if-modified-since" header ";" split1 drop\r
+ dup [ rfc822>timestamp ] when ;\r
+\r
: modified-since? ( filename -- ? )\r
- request get "if-modified-since" header dup [\r
- [ file-info modified>> ] [ rfc822>timestamp ] bi* after?\r
+ request get modified-since dup [\r
+ [ file-info modified>> ] dip after?\r
] [\r
2drop t\r
] if ;\r