This is the oddest thing. When I add the ;
in set_form_data
, value
gets interpreted as value;
on the server side. When I remove the ;
, the value for 'dontescape' gets interpreted as file%3a%2f%2f%2fpath%2fto
. What the heck is happening? I don't want anything escaped unless I explicitly call CGI::escape! Please help :)
postParams = {
'key1' => 'value',
'dontescape' => 'file:///path/to'
}
url = URI.parse('https://my.url')
req = Net::HTTP::Post.new(url.path)
req.basic_auth('username', 'password')
req.set_form_data(postParams, ';')
sock = Net::HTTP.new(url.host, 443)
sock.use_ssl = true
sock.ssl_version = 'SSLv3'
sock.start do |http|
response = http.request(req) do
return response.body
end