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...
Cheers
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Jan-20 09:32 UTC
Re: Net::http breaks post request, Curb (curl) does not
On Jan 20, 9:01 am, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> > 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> > Cheers > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
comopasta Gr
2010-Jan-20 09:50 UTC
Re: Net::http breaks post request, Curb (curl) does not
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.