aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net/http.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-25 08:54:32 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-25 08:54:32 +0000
commit67d05682b0f4650d34ce5da81f8c89077a78c6ba (patch)
tree7fac4d5be7b3ab147f95d4f6d47145363f3dc14a /lib/net/http.rb
parent6be6666fba64ccad17b789ed54eade1443b53d23 (diff)
downloadruby-67d05682b0f4650d34ce5da81f8c89077a78c6ba.tar.gz
* lib/net/http.rb (Net::HTTP#connect): disable Nagle's algorithm on
HTTP connection. [ruby-core:56158] [Feature #8681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index a383ff617f..a179dcf348 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -877,6 +877,7 @@ module Net #:nodoc:
s = Timeout.timeout(@open_timeout, Net::OpenTimeout) {
TCPSocket.open(conn_address, conn_port, @local_host, @local_port)
}
+ s.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
D "opened"
if use_ssl?
ssl_parameters = Hash.new