Created
May 14, 2009 23:47
-
-
Save jschementi/111988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment