From: Alex Stahl Date: 2010-12-08T04:50:07+09:00 Subject: Re: HTTP POST request --> Ruby server --=-X0btfICJQICRtz5aJ2eI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Can't say I know a solution for you... but you might want to try using Wireshark to check what's being sent. FF dev tools, in my experience, tend to be somewhat buggy and don't always accurately report what's going on. Wireshark will give you a much more exacting view as to what's in the content-body of the POST request. Especially because this part sounds really odd and not at all reflective of what's happening - "FireFox simply stops sending data" - FF doesn't send a header, wait for a response, and then send the body, which is what this implies. Lest you somehow configured it to use HEAD instead of POST. ________________________________________________________________________ Alex Stahl | Sr. Quality Engineer | hi5 Networks, Inc. | astahl@hi5.com | On Tue, 2010-12-07 at 13:43 -0600, Chananya Freiman wrote: > I am making a tiny web server, and I am having problems with HTTP POST > requests. > > I made a button which sends a POST request to my server containing 3 > characters (just to test), say "abc", using Javascript (XMLHttpRequest). > My server gets all the HTTP headers just fine, even the content length, > but when it gets to the actual content, after the finishing \r\n\r\n of > the headers, it simply gets stuck. > > I got the HttpFox add-on for FireFox to see if FF is actually sending > everything, and it confirmed that something odd is going around here. > > If I only read the headers, or even read nothing - FireFox sends > everything and I can respond from my server (of course, without knowing > the POST data...). > If I try to get past the headers - FireFox simply stops sending data, > which reflects why my Ruby server doesn't get it. > > Is this somehow a bug in Ruby? Has anyone encountered something similar > and knows how to solve it? > > Thanks. > --=-X0btfICJQICRtz5aJ2eI--