--- a\ruby\lib\ruby\1.8\webrick\httprequest.rb Tue Feb 13 03:01:20 2007 +++ b\ruby\lib\ruby\1.8\webrick\httprequest.rb Thu May 7 16:45:54 2009 @@ -16,6 +16,11 @@ require 'webrick/httputils' require 'webrick/cookie' +# IronRuby bug: IO#read seems to chop off the first char + +class TCPSocket + def read size + recv size + end +end + module WEBrick class HTTPRequest @@ -161,8 +166,8 @@ end def to_s - ret = @request_line.dup - @raw_header.each{|line| ret << line } + ret = @request_line ? @request_line.dup : "" + @raw_header.each{|line| ret << line } if @raw_header ret << CRLF ret << body if body ret