anchor.diff:               (every #'stringp (rest directory))))))
   
   (defun resolve-file (script-name document-root)
  -  (merge-pathnames (script-name-to-filename script-name) document-root))
  +  (merge-pathnames (add-index (subseq script-name 1)) document-root))
   
  -(defun script-name-to-filename (script-name)
  -  (if (equal script-name "/") "index.html" (subseq script-name 1)))
  +(defun add-index (filename &key (extension "html"))
  +  (format nil "~a~@[index~*~@[.~a~]~]" filename (ends-with #\/ filename) extension))
   
   (defun make-prefix-handler (prefix sub-handler)
     "Make a handler that handles the request with SUB-HANDLER if the
  
positive.code: 
  (defun make-exact-path-handler (path sub-handler)
    "Make a handler that handles the request with SUB-HANDLER if the
  file name of the request is exactyl the given PATH."
    (lambda (request)
      (maybe-handle (string= path (script-name request))
        (handle-request sub-handler request))))
  
negative.code:     (let ((mismatch (mismatch (script-name request) prefix :test #'char=)))
        (maybe-handle (or (null mismatch) (>= mismatch (length prefix)))
          (handle-request sub-handler request)))))
  
  (defun make-prefix-directory-handler (uri-prefix document-root)
    "Make a handler that handles URIs with a given prefix, serving them
  with files under a given DOCUMENT-ROOT after stripping the prefix from
  the URI."
    (make-prefix-handler 
     uri-prefix
     (make-static-file-handler document-root (subseq uri-prefix 0 (1- (length uri-prefix))))))
  
  (defun make-regex-handler (regex sub-handler)
    "Make a handler that handles the request with SUB-HANDLER if the
  