I'm having a problem with http.post for ruby 1.8.4.  Specifically, the 
server I'm posting to is complaining that it is not getting all the 
parameter I'm sending.

This code snippet works in version 1.8.2 but fails in 1.8.4

@http = Net::HTTP.new( server, port )
@headers['Content-Type'] = 'text/html'
data = 'Type=METADATA-SYSTEM&ID=0'
resp = @http.post(uri,data,@headers )


The server I'm posting appears to only get the first parameter 
'Type=METADATA' but is complaining that the second paramert 'ID=0' is 
missing.  Switching order doesn't matter.

There was a similar issue reported on rubyforge. 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4782&group_id=426 
I updated the feedvalidator and am also manually setting the 
content-type but nothing seems to work.

I'm talking to an ASP.NET, if that matters.



Making things more confusing, this bit of code seems to work.

require 'net/http'

Net::HTTP.start('www.snee.com', 80) {|http|
  result = http.post('/xml/crud/posttest.cgi',
'fname=works&lname=here')
  puts result
}


Any help would be greatly appreciated!

Regards,
Mike

-- 
Posted via http://www.ruby-forum.com/.