mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb: speeding up by avoiding extra flush. (suggested by Brian Candler <B.Candler@pobox.com>)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2abf664151
commit
cacf41f3b6
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Mar 11 20:07:01 2003 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/http.rb: speeding up by avoiding extra flush.
|
||||
(suggested by Brian Candler <B.Candler@pobox.com> [ruby-talk:66516])
|
||||
|
||||
Tue Mar 11 04:30:12 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (massign): remove unnecessary array unpacking; it should
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
= net/http.rb
|
||||
|
||||
Copyright (c) 1999-2002 Yukihiro Matsumoto
|
||||
Copyright (c) 1999-2003 Yukihiro Matsumoto
|
||||
Copyright (c) 1999-2003 Minero Aoki
|
||||
|
||||
written & maintained by Minero Aoki <aamine@loveruby.net>.
|
||||
This file is derived from "http-access.rb".
|
||||
|
@ -1170,11 +1171,12 @@ module Net
|
|||
end
|
||||
|
||||
def request( sock, ver, path )
|
||||
sock.writeline sprintf('%s %s HTTP/%s', @method, path, ver)
|
||||
buf = "#{@method} #{path} HTTP/#{ver}\r\n"
|
||||
canonical_each do |k,v|
|
||||
sock.writeline k + ': ' + v
|
||||
buf << k + ': ' + v + "\r\n"
|
||||
end
|
||||
sock.writeline ''
|
||||
buf << "\r\n"
|
||||
sock.write buf
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue