diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-08 09:41:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-08 09:41:24 +0000 |
commit | 877ac7236a8c509959eddc5add7ba0f10fae4804 (patch) | |
tree | ca9b63d5311f04114dbf248265560744cbe9b415 /lib/webrick/httprequest.rb | |
parent | 75fcee4a23d5a549f407a0404732e2ccc6b949e1 (diff) | |
download | ruby-877ac7236a8c509959eddc5add7ba0f10fae4804.tar.gz |
* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#do_CONNECT):
use #bytesize instead of #size. a patch submitted from
raspberry lemon in [ruby-core:18571].
* lib/webrick/httpauth/digestauth.rb, lib/webrick/httpproxy.rb,
lib/webrick/httprequest.rb, lib/webrick/httpservlet/cgi_runner.rb,
lib/webrick/httpservlet/abstract.rb, lib/webrick/httpresponse.rb,
lib/webrick/httpservlet/cgihandler.rb, lib/webrick/utils.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/httprequest.rb')
-rw-r--r-- | lib/webrick/httprequest.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb index f0994ef253..889a83abe4 100644 --- a/lib/webrick/httprequest.rb +++ b/lib/webrick/httprequest.rb @@ -244,7 +244,7 @@ module WEBrick def read_request_line(socket) @request_line = read_line(socket, 1024) if socket - if @request_line.size >= 1024 and @request_line[-1, 1] != LF + if @request_line.bytesize >= 1024 and @request_line[-1, 1] != LF raise HTTPStatus::RequestURITooLarge end @request_time = Time.now @@ -307,7 +307,7 @@ module WEBrick while @remaining_size > 0 sz = [@buffer_size, @remaining_size].min break unless buf = read_data(socket, sz) - @remaining_size -= buf.size + @remaining_size -= buf.bytesize block.call(buf) end if @remaining_size > 0 && @socket.eof? @@ -334,7 +334,7 @@ module WEBrick chunk_size, = read_chunk_size(socket) while chunk_size > 0 data = read_data(socket, chunk_size) # read chunk-data - if data.nil? || data.size != chunk_size + if data.nil? || data.bytesize != chunk_size raise BadRequest, "bad chunk data size." end read_line(socket) # skip CRLF |