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
上级 fbe05067
......@@ -64,6 +64,11 @@ def test_text_field_with_options
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)
......
*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:
......
......@@ -142,7 +142,7 @@ def extract_header_and_body(data)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册