: find-index ( filename -- path )
file-responder get index-names>>
- [ append-path dup exists? [ drop f ] unless ] with map-find
+ [ append-path dup file-exists? [ drop f ] unless ] with map-find
drop ;
: serve-directory ( filename -- response )
] if ;
: serve-object ( filename -- response )
- serving-path dup exists?
+ serving-path dup file-exists?
[ dup file-info directory? [ serve-directory ] [ serve-file ] if ]
[ drop <404> ]
if ;