Project

General

Profile

Bug #723 » reproduce.rb

reproduce the bug - eveel (Dmitry A. Ustalov), 11/08/2008 06:41 PM

 
#!/usr/bin/env ruby

# resolve any URI
require 'uri'
url = URI.parse("http://paste.org.ru/") # put your favourite site here!

# define the data
data = 'data=oops'

# prepare the request
require 'net/http'
http = Net::HTTP.new(url.host, url.port)

# set the headers
headers = {
'Content-Length' => data.size
}

resp = http.post(url.path, data, headers)
(2-2/2)