From: Peer Allan Date: 2007-05-25T02:21:43+09:00 Subject: Re: Problem with Net/HTTP Thanks Brian, That gave me somewhere to do, but I failed to mention that the web service requires an SSL connection so everything in the dump is encrypted. Nuts! Not sure what to do now. I may try to generate the request on my own. Thanks Peer Brian Candler wrote: > On Fri, May 25, 2007 at 01:21:04AM +0900, Peer Allan wrote: >> I am running into a serious problem with a custom library I am building >> in Ruby. Basically I am writing a Ruby interface to a custom web >> service that we have here at our company. The problem I am running into >> is that I am posting the XML document to the service and it is >> responding, but net/http is telling me there is no body >> (response.body.empty? => true). > > Can you prove the response is there? The best way to do this is > > tcpdump -i eth0 -n -s0 -A tcp port 80 > > and look at the raw IP packets being sent by Ruby, and the response > coming > back. > > If you are on Windoze, then a sniffer like wireshark will do the trick. > >> I can't even find a way to see the raw response the >> net/http received so I can check to see if it is just parsing it >> incorrectly. > > There are two possible cases: Ruby is sending the request differently to > PHP, or Ruby is parsing the response differently. Using tcpdump you > should > be able to find out (and compare what PHP is sending with what Ruby is > sending) > > HTH, > > Brian. -- Posted via http://www.ruby-forum.com/.