Net::http breaks post request, Curb (curl) does not

Hi,

I'm having a problem with a simple post request. The issue is that the receiving side fails to process the message because apparently the body of the post message is not sent in a single packet together with the headers. The body contains only xml.

I'm running webrick. The thing is that if I use NET::HTTP the problem occurs

h = Net::HTTP::new('192.168.xx.xx', 65654) headers = { 'Content-Type' => 'application/xml' } @resp = h.request_post(url, ops, headers)

BUT if I use Curl (via the Curb gem) then there is no problem. Everything is sent in one packet and the other side reads the contents properly.

Is there a way to tell net::http to send the request at once?? I'd like to use that.

I'll now go through the pain of installing Curb/curl on windows where the app runs. So if someone has any hints to get net::http working...

I don't know of such an option, I do however know that any server that has such a requirement is rather odd and non standards compliant (and what are you going to do when you need to send more than one packet of data or if a user (for whatever random reason) has a connection with a lower packet size than you currently do ?).

Fred

Thanks Fred,

Yes you are right the server that is processing the request is not really the best. It is for a demo and apparently it behaves that way.

I'm trying to get Curb gem on the windows machine, let see how it goes. Using google for that already.

Cheers