From 73499158df05ed68fb9cf2679286a603db91f1ef Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 5 Jan 2007 04:09:38 +0000 Subject: Fixed that webrick would strip leading newlines and hang connection (closes #4156) [psross] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/webrick_server.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 302782c73a..956814f17f 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that webrick would strip leading newlines and hang connection #4156 [psross] + * Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick] If you really want your plugins to reload, add this to the very top of init.rb: diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 71ef275ba4..ad4ca926ba 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -142,7 +142,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet data.rewind data = data.read - raw_header, body = *data.split(/^[\xd\xa]+/on, 2) + raw_header, body = *data.split(/^[\xd\xa]{2}/on, 2) header = WEBrick::HTTPUtils::parse_header(raw_header) return header, body -- cgit v1.2.3