Use chop! instead of chop! for efficiency

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck
2005-09-02 18:01:26 +00:00
parent 62ec1a5373
commit 89550ee7e9

View File

@@ -53,7 +53,7 @@ class CGI #:nodoc:
stdinput.binmode if stdinput.respond_to?(:binmode)
content = stdinput.read(Integer(env_table['CONTENT_LENGTH'])) || ''
# fix for Safari Ajax postings that always append \000
content = content.chop if content[-1] == 0
content.chop! if content[-1] == 0
env_table['RAW_POST_DATA'] = content.freeze
end