From: GOTOU Yuuzou Date: 2004-11-30T03:35:48+09:00 Subject: Re: WEBrick HTTPRequest#to_s should never fail, but does In message <200411271509.58571.neoneye@adslhome.dk>, `Simon Strandgaard ' wrote: > While experimenting with XmlHttpRequest, I wanted to dump my req > > [snip code] > def do_POST(req, res) > puts "req=#{req.to_s}" # BOOM, HTTPStatus::LengthRequired occured. > [snip code] > > IMO, #to_s should never fail. > > I think its related to a bad Content-Length:, but is not sure since its > difficult to debug when #to_s fails. HTTPRequest#raw_header may be useful for this purpose. def do_POST(req, res) p req.request_line req.raw_header.each{|h| p h } ... end I'm sorry to post this too late. -- gotoyuzo