Eric Hodel wrote: >Gianni Jacklone (gianni / one6ix.com) wrote: > > > >>Martin Pirker wrote: >> >> >> >>>Gianni Jacklone <gianni / one6ix.com> wrote: >>> >>> >>> >>>>Quick question about WEBrick: Is there a way to get at the raw post data >>>> >>>> >>>>from a post request, much like the var $HTTP_RAW_POST_DATA in php, and >>> >>> >>>>request.getInputStream() from Java? >>>> >>>> >>>ruby-talk 94785 >>> >>> >>I'm having trouble interpretting it. At the top of the message it says >>"Request body is not read from socket when servlets are started." Then >>soon after it says "But HTTPServer is going to read the body before >>sending response". >> >>The example code shows a custom servlet using req.query["data"] where >>"data" was the name of the file input type. >> >>So I derive from AbstractServlet and use req.query["data"] to get at the >>raw post data for a form element. Am I correct? >> >> > >Yes. > > > >>In my particular case however, I am after the entire body of the POST, >>my WEBrick servlet receives a POST request of binary data from an >>external agent, and I need to get the raw binary data and parse it futher.. >> >> > >Why don't you use multipart/form-data on the sending end? (You have no >control over it?) > > > I do not. The POST is from a Flash Application, I am writing a Flash Remoting Gateway for Ruby. >>From my tests, where I derive a custom servlet and in do_Post I use >>request.body, it seems to give me the raw POST data. Perhaps I am wrong >>in this thinking however? >> >> > >This should work. > > > It appears it does. Thanks for the help, much appreciated. == -- Gianni Jacklone One6ix tel: 917 573 8263 www.one6ix.com