# File lib/openid/yadis/xrires.rb, line 84
      def self.append_args(url, args)
        return url if args.length == 0

        # rstrip question marks
        rstripped = url.dup
        while rstripped[-1].chr == '?'
          rstripped = rstripped[0...rstripped.length-1]
        end

        if rstripped.index('?')
          sep = '&'
        else
          sep = '?'
        end

        return url + sep + XRI.urlencode(args)
      end