def escape_uri(str)
      str = str.dup
      binary_encode(str)
      str.gsub(UNESCAPED) { "%%%02X" % $1[0].ord }
    end
def escape_uri(str)
      str = str.dup
      binary_encode(str)
      str.gsub(UNESCAPED) { "%%%02X" % $1[0].ord }
    end
Escapes HTTP reserved and unwise characters in +str+