# File lib/mongrel/handlers.rb, line 129
    def can_serve(path_info)

      req_path = HttpRequest.unescape(path_info)
      # Add the drive letter or root path
      req_path = File.join(@path, req_path) if @path
      req_path = File.expand_path req_path
      
      if File.exist? req_path and (!@path or req_path.index(@path) == 0)
        # It exists and it's in the right location
        if File.directory? req_path
          # The request is for a directory
          index = File.join(req_path, @index_html)
          if File.exist? index
            # Serve the index
            return index
          elsif @listing_allowed
            # Serve the directory
            return req_path
          else
            # Do not serve anything
            return nil
          end
        else
          # It's a file and it's there
          return req_path
        end
      else
        # does not exist or isn't in the right spot
        return nil
      end
    end