# File lib/cgikit/handler.rb, line 40
    def id_by_separating( path, context = true )
      path = path.reverse.chop.reverse
      separated = path.split('/')
      separated.delete_at(0)
      id = nil
      case separated.size
      when 1
        if context then
          if separated.last.include?(Context::SEPARATOR) then
            id = separated.last
          end
        else
          if !separated.last.include?(Context::SEPARATOR) then
            id = separated.last
          end
        end
      when 2
        if context then
          id = separated.last
        else
          id = separated.first
        end
      end
      if id and !context and !Session.session_id?(id) then
        id = nil
      end
      id
    end