diff options
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 5 | ||||
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/webrick_server.rb | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index a7ceb6b30f..69aef4e5f1 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -64,6 +64,11 @@ class FormHelperTest < Test::Unit::TestCase assert_dom_equal expected, text_field("post", "title", :size => 35) end + def test_text_field_with_prefix + expected = '<input id="book_post_title" name="book[post][title]" size="35" type="text" value="Hello World" />' + assert_dom_equal expected, text_field("post", "title", :size => 35, :prefix => :book) + end + def test_text_field_assuming_size expected = '<input id="post_title" maxlength="35" name="post[title]" size="35" type="text" value="Hello World" />' assert_dom_equal expected, text_field("post", "title", "maxlength" => 35) 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 |