⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby 1.8
All Projects
Ruby
»
Ruby 1.8
Overview
Activity
Roadmap
Issues
Wiki
Like
Download (356 Bytes)
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
)
« Previous
1
2
Next »
(2-2/2)
Loading...