def bad_uri?(path)
      invalid_segments = %w{. ..}
      path.split('/').any? { |segment| invalid_segments.include?(segment) }
    end
def bad_uri?(path)
      invalid_segments = %w{. ..}
      path.split('/').any? { |segment| invalid_segments.include?(segment) }
    end
Determines whether or not _path_ is an acceptable URI.

 @param [String] path the path part of the request URI.

 @return [Boolean] +true+ if the requested path is considered invalid;
   otherwise, +false+.