From: matz@... (Yukihiro Matsumoto) Date: 2003-07-27T23:34:11+09:00 Subject: Re: Bug in Net::HTTP Hello, In message "Bug in Net::HTTP" on 03/07/27, Philip Mak writes: |Net::HTTP will crash if the remote HTTP server returns a Content-Range |header without a Content-Length header. I have attached a program that |will reproduce the bug. The program has a self-contained dummy HTTP |server that listens on localhost 12345. It then connects to that |server using Net::HTTP, which feeds Net::HTTP a response containing a |Content-Range header without a Content-Length header, causing it to |crash due to the bug. The following patch seems to work. It still need to be confirmed by the maintainer. matz. --- lib/net/http.rb 2 Jul 2003 02:05:35 -0000 1.86 +++ lib/net/http.rb 27 Jul 2003 14:33:12 -0000 @@ -1146,3 +1146,3 @@ module Net r = self.content_range - r and r.length + r and r.end - r.begin end