net-http-persistent-pool 2.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 47ee30621b36d94d284dbbf2dd67b2edb366995b
4
+ data.tar.gz: 9095b44c684a9d591fdf6175753e90f726659d3a
5
+ SHA512:
6
+ metadata.gz: bd1166479466ef8b2e55388bc098a4f1d9d609b23b4a2f253d42bfd1d9cec47468d4b1a6d7d25cf0a080a9abe30c0d841d22e61103d2d747ef99d7e2744065e4
7
+ data.tar.gz: 5d076e9c8ba7c468c59e1697520c3ed03920d7b9320ee33d001599d3d267aeef25f4356d7c0cc27bf05056deab1cea6e7ac82c90883cff166f3ab19c56670477
@@ -0,0 +1,9 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ Autotest.add_hook :initialize do |at|
6
+ at.add_exception '.git'
7
+ at.add_exception '.rdoc'
8
+ end
9
+
File without changes
@@ -0,0 +1,346 @@
1
+ === 2.10.0 / 2016-05-09
2
+
3
+ * Major enhancement
4
+ * Uses a connection pool. Work by Eric Hodel.
5
+
6
+ === 2.9.5 / 2014-11-20
7
+
8
+ * Bug fixes
9
+ * Add missing SSL options ca_path, ciphers, ssl_timeout, verify_depth.
10
+ Issue #63 by Johnneylee Jack Rollins.
11
+
12
+ === 2.9.4 / 2014-02-10
13
+
14
+ * Bug fixes
15
+ * Improve proxy escaping from 2.9.2. Pull request #59 by Mislav Marohnić.
16
+
17
+ === 2.9.3 / 2014-02-06
18
+
19
+ * Bug fixes
20
+ * Fix breakage in 2.9.2 for users without proxies. Pull request #56 by
21
+ Yoshihiro TAKAHARA (merged), #57 by ChuckLin, #58 by Kenny Meyer.
22
+
23
+ === 2.9.2 / 2014-02-05
24
+
25
+ * Bug fixes
26
+ * Special characters in proxy passwords are now handled correctly. Issue
27
+ #48 by Mislav Marohnić. Pull request #54 by Juha Kajava
28
+
29
+ === 2.9.1 / 2014-01-22
30
+
31
+ * Bug fixes
32
+ * Added license to gemspec. Issue #47 by Benjamin Fleischer
33
+ * Set Net::HTTP#keep_alive_timeout when supported by ruby. Pull request #53
34
+ by Dylan Thacker-Smith.
35
+ * The backtrace is preserved for errors in #reset to help with debugging.
36
+ Issue #41 by Andrew Cholakian.
37
+
38
+ === 2.9 / 2013-07-24
39
+
40
+ * Minor enhancement
41
+ * Added Net::HTTP::Persistent#max_requests to avoid ECONNRESET for a server
42
+ that allows a limited number of requests on a connection. Pull request
43
+ #42 by James Tucker.
44
+ * Request failures are now raised with the backtrace of the original
45
+ exception. This gives better insight into the reason for the failure.
46
+ See #41 by Andrew Cholakian.
47
+ * OpenSSL is no longer required. If OpenSSL is not available an exception
48
+ will be raised when attempting to access HTTPS resources. Feature request
49
+ by André Arko
50
+
51
+ * Bug fixes
52
+ * Explain the proper way of sending parameters depending upon the request
53
+ method. Issue #35 by André Arko.
54
+ * Handle Errno::ETIMEDOUT by retrying the request. Issue #36 by André Arko.
55
+ * Requests retried by ruby 2.x are no longer retried by net-http-persistent.
56
+ * Finish the connection if an otherwise unhandled exception happens during a
57
+ request. Bug #46 by Mark Oude Veldhuis.
58
+ * Net::HTTP::Persistent::detect_idle_timeout now assumes a StandardError
59
+ indicates the idle timeout has been found. Bug #43 by James Tucker.
60
+
61
+ === 2.8 / 2012-10-17
62
+
63
+ * Minor enhancements
64
+ * Added Net::HTTP::Persistent::detect_idle_timeout which can be used to
65
+ determine the idle timeout for a host.
66
+ * The read timeout may now be updated for every request. Issue #33 by
67
+ Mislav Marohnić
68
+ * Added NO_PROXY support. Pull Request #31 by Laurence Rowe.
69
+ * Added #cert and #key aliases for Net::HTTP compatibility. Pull request
70
+ #26 by dlee.
71
+ * The artifice gem now disables SSL session reuse to prevent breakage of
72
+ testing frameworks. Pull Request #29 by Christopher Cooke.
73
+ * Disabled Net::HTTP::Persistent::SSLReuse on Ruby 2+. This feature is now
74
+ built-in to Net::HTTP.
75
+ * Bug fixes
76
+ * Socket options are set again following connection reset. Pull request #28
77
+ by cmaion.
78
+ * #shutdown now works even if no connections were made. Pull Request #24 by
79
+ James Tucker.
80
+ * Updated test RSA key size to 1024 bits. Bug #25 by Gunnar Wolf.
81
+ * The correct host:port are shown in the exception when a proxy connection
82
+ fails. Bug #30 by glebtv.
83
+
84
+ === 2.7 / 2012-06-06
85
+
86
+ * Minor enhancement
87
+ * Added JRuby compatibility by default for HTTPS connections. (JRuby lacks
88
+ OpenSSL::SSL::Session.)
89
+
90
+ === 2.6 / 2012-03-26
91
+
92
+ * Minor enhancement
93
+ * Net::HTTP::Persistent#idle_timeout may be set to nil to disable expiration
94
+ of connections. Pull Request #21 by Aaron Stone
95
+
96
+ === 2.5.2 / 2012-02-13
97
+
98
+ * Bug fix
99
+ * Fix variable shadowing warning.
100
+
101
+ === 2.5.1 / 2012-02-10
102
+
103
+ * Bug fix
104
+ * Reusing SSL connections with HTTP proxies now works. Issue #15 by Paul
105
+ Ingham and mcrmfc
106
+
107
+ === 2.5 / 2012-02-07
108
+
109
+ * Minor enhancements
110
+ * The proxy may be changed at any time.
111
+ * The allowed SSL version may now be set via #ssl_version.
112
+ Issue #16 by astera
113
+ * Added Net::HTTP::Persistent#override_headers which allows overriding
114
+ * Net::HTTP default headers like User-Agent. See
115
+ Net::HTTP::Persistent@Headers for details. Issue #17 by andkerosine
116
+
117
+ * Bug fixes
118
+ * The ruby 1.8 speed monkeypatch now handles EAGAIN for windows users.
119
+ Issue #12 by Alwyn Schoeman
120
+ * Fixed POST example in README. Submitted by injekt.
121
+ * Fixed various bugs in the shutdown of connections especially cross-thread
122
+ (which you shouldn't be doing anyways).
123
+
124
+ === 2.4.1 / 2012-02-03
125
+
126
+ * Bug fixes
127
+ * When FakeWeb or WebMock are loaded SSL sessions will not be reused to
128
+ prevent breakage of testing frameworks. Issue #13 by Matt Brictson, pull
129
+ request #14 by Zachary Scott
130
+ * SSL connections are reset when the SSL parameters change.
131
+ Mechanize issue #194 by dsisnero
132
+ * Last-use times are now cleaned up in #shutdown.
133
+
134
+ === 2.4 / 2012-01-31
135
+
136
+ * Minor enhancement
137
+ * net-http-persistent now complains if OpenSSL::SSL::VERIFY_PEER is equal to
138
+ OpenSSL::SSL::VERIFY_NONE. If you have a platform that is broken this way
139
+ you must define the constant:
140
+
141
+ I_KNOW_THAT_OPENSSL_VERIFY_PEER_EQUALS_VERIFY_NONE_IS_WRONG = nil
142
+
143
+ at the top level of your application to disable the warning.
144
+
145
+ * Bug fix
146
+ * Fix persisting SSL sessions through HTTP proxies. Mechanize issue #178 by
147
+ Robert Poor, net-http-persistent issues #10, #11.
148
+
149
+ === 2.3.2 / 2011-12-21
150
+
151
+ * Bug fix
152
+ * Finish connections that were closed by Net::HTTP so they can be restarted.
153
+
154
+ === 2.3.1 / 2011-10-26
155
+
156
+ * Bug fix
157
+ * If a request object already contains a Connection header it will no longer
158
+ be overridden. This allows keep-alive connections to be disabled on a
159
+ per-request basis.
160
+
161
+ === 2.3 / 2011-10-25
162
+
163
+ * Minor Enhancement
164
+ * The time since last use for a connection is now recorded in error
165
+ messages for the connection.
166
+
167
+ === 2.2 / 2011-10-24
168
+
169
+ * Minor Enhancements
170
+ * Added timeouts for idle connections which are set through #idle_timeout.
171
+ The default timeout is 5 seconds. Reducing the idle timeout is preferred
172
+ over setting #retry_change_requests to true if you wish to avoid the "too
173
+ many connection resets" error when POSTing data.
174
+ * Documented tunables and settings in one place in Net::HTTP::Persistent
175
+
176
+ === 2.1 / 2011-09-19
177
+
178
+ * Minor Enhancement
179
+ * For HTTPS connections, SSL sessions are now reused avoiding the extra
180
+ round trips and computations of extra SSL handshakes. If you have
181
+ problems with SSL session reuse it can be disabled by
182
+ Net::HTTP::Persistent#reuse_ssl_sessions
183
+
184
+ * Bug Fixes
185
+ * The default certificate store is now used even if #verify_mode was not
186
+ set. Issue #7, Pull Request #8 by Matthew M. Boedicker
187
+
188
+ === 2.0 / 2011-08-26
189
+
190
+ * Incompatibility
191
+ * Net::HTTP::Persistent#verify_mode now defaults to
192
+ OpenSSL::SSL::VERIFY_PEER. This may cause HTTPS request failures if your
193
+ default certificate store lacks the correct certificates.
194
+
195
+ === 1.9 / 2011-08-26
196
+
197
+ * Minor Enhancement
198
+ * Added Net::HTTP::Persistent#cert_store to set an SSL certificate store
199
+ which defaults to the OpenSSL default certificate store.
200
+
201
+ HTTPS server certificates will be validated when this option is combined
202
+ with setting Net::HTTP::Persistent#verify_mode to
203
+ OpenSSL::SSL::VERIFY_PEER.
204
+
205
+ === 1.8.1 / 2011-08-08
206
+
207
+ * Bug Fix
208
+ * Requests with OpenSSL errors are retried now. Pull Request #5 by James
209
+ Tucker.
210
+
211
+ === 1.8 / 2011-06-27
212
+
213
+ * Minor Enhancement
214
+ * Added Net::HTTP::Persistent#retry_change_requests which allows POST and
215
+ other non-idempotent requests to be retried automatically. Take care when
216
+ enabling this option to ensure the server will handle multiple POSTs with
217
+ the same data in a sane manner.
218
+
219
+ === 1.7 / 2011-04-17
220
+
221
+ * Minor Enhancement
222
+ * Added Net::HTTP::Persistent#pipeline which integrates with
223
+ net-http-pipeline when it is present.
224
+ * Bug Fix
225
+ * Perform a case-insensitive check of the URI scheme for HTTPS URIs
226
+
227
+ === 1.6.1 / 2011-03-08
228
+
229
+ * Bug Fix
230
+ * Net::HTTP::Persistent#request now handles Errno::EINVAL as a connection
231
+ reset and will be retried for idempotent requests. Reported by Aaron
232
+ Qian.
233
+
234
+ === 1.6 / 2011-03-01
235
+
236
+ * Minor Enhancement
237
+ * Added Net::HTTP::Persistent#socket_options to set multiple socket options
238
+ at socket startup.
239
+
240
+ === 1.5.2 / 2011-02-24
241
+
242
+ * Bug Fix
243
+ * Only set TCP_NODELAY if the connection has an @socket. Allows
244
+ net-http-persistent to be used with fake_web. Reported by Sathish
245
+ Pasupunuri.
246
+
247
+ === 1.5.1 / 2011-02-10
248
+
249
+ * Bug fix
250
+ * Only set TCP_NODELAY at connection start. Reported by Brian Henderson.
251
+
252
+ === 1.5 / 2011-01-25
253
+
254
+ * Minor Enhancements
255
+ * Set TCP_NODELAY on created socket if possible. (This will only help for
256
+ requests that send bodies.)
257
+
258
+ === 1.4.1 / 2010-10-13
259
+
260
+ * Bug Fixes
261
+ * Don't finish the connection when we're retrying, reset it. Patch by James
262
+ Tucker.
263
+
264
+ === 1.4 / 2010-09-29
265
+
266
+ * Minor Enhancements
267
+ * Added the very dangerous #shutdown_in_all_threads. IT IS DANGEROUS!.
268
+ Patch by Torsten Schönebaum.
269
+
270
+ === 1.3.1 / 2010-09-13
271
+
272
+ * Bug Fixes
273
+ * #connection_for no longer tries to ssl-enable an existing connection.
274
+ Patch by Joseph West.
275
+
276
+ === 1.3 / 2010-09-08
277
+
278
+ * Minor Enhancements
279
+ * HTTP versions are now recorded. This information is not currently used.
280
+
281
+ * Bug Fixes
282
+ * #shutdown no longer fails when an unstarted HTTP connection is shut down.
283
+
284
+ === 1.2.5 / 2010-07-27
285
+
286
+ * Bug Fixes
287
+ * Fix duplicated test name. Noted by Peter Higgins.
288
+ * #shutdown now works even when no connections were made.
289
+
290
+ === 1.2.4 / 2010-07-26
291
+
292
+ * Bug Fixes
293
+ * Actually have #request only finish a connection. Somehow this got
294
+ missed.
295
+
296
+ === 1.2.3 / 2010-06-29
297
+
298
+ * Bug Fixes
299
+ * Fix example code (pointed out by Alex Stahl)
300
+
301
+ === 1.2.2 / 2010-06-22
302
+
303
+ * Bug Fixes
304
+ * #request only finishes a connection instead of restarting it. This helps
305
+ prevents errors on non-idempotent HTTP requests after errors.
306
+ * #connection_for handles EHOSTDOWN like #reset
307
+
308
+ === 1.2.1 / 2010-05-25
309
+
310
+ * Bug Fixes
311
+ * Don't alter Net::BufferedIO#rbuf_fill on 1.9+
312
+
313
+ === 1.2 / 2010-05-20
314
+
315
+ * Minor Enhancements
316
+ * Net::HTTP#read_timeout is now supported
317
+ * Net::HTTP#open_timeout is now supported
318
+ * Net::HTTP::Persistent#request now supports a block like Net::HTTP#request
319
+
320
+ === 1.1 / 2010-05-18
321
+
322
+ * Minor Enhancements
323
+ * Proxy support, see Net::HTTP::Persistent::new,
324
+ Net::HTTP::Persistent#proxy_from_env
325
+ * Added +name+ parameter to Net::HTTP::Persistent::new for separation of
326
+ connection pools.
327
+ * Added Net::HTTP::Persistent#shutdown so you can clean up after yourself
328
+ * Net::HTTP::Persistent now suppresses "peer certificate won't be verified
329
+ in this SSL session" warning.
330
+
331
+ * Bug Fixes
332
+ * Net::HTTP::Persistent retries requests in accordance with RFC 2616.
333
+
334
+ === 1.0.1 / 2010-05-05
335
+
336
+ * Minor Enhancements
337
+ * Added #debug_output
338
+ * Now uses Hoe minitest plugin
339
+ * Bug Fixes
340
+ * Tests pass on 1.9
341
+
342
+ === 1.0.0 / 2010-05-04
343
+
344
+ * Major Enhancements
345
+ * Birthday!
346
+
@@ -0,0 +1,15 @@
1
+ .autotest
2
+ .gemtest
3
+ History.txt
4
+ Manifest.txt
5
+ README.rdoc
6
+ Rakefile
7
+ lib/net/http/faster.rb
8
+ lib/net/http/persistent.rb
9
+ lib/net/http/persistent/connection.rb
10
+ lib/net/http/persistent/pool.rb
11
+ lib/net/http/persistent/ssl_reuse.rb
12
+ lib/net/http/persistent/timed_stack_multi.rb
13
+ test/test_net_http_persistent.rb
14
+ test/test_net_http_persistent_ssl_reuse.rb
15
+ test/test_net_http_persistent_timed_stack_multi.rb
@@ -0,0 +1,93 @@
1
+ = net-http-persistent-pool
2
+
3
+ * http://docs.seattlerb.org/net-http-persistent
4
+ * https://github.com/drbrain/net-http-persistent
5
+
6
+ == IMPORTANT:
7
+
8
+ This a fork of the existing net-http-persistent repo, with a single objective
9
+ of making the existing connection pool work on master available as a versioned
10
+ and publicly available gem in rubygems.
11
+
12
+ This gem will only exist until the connection pool work is available in the
13
+ parent project as part of a gem release.
14
+
15
+ Users of this gem should +require 'net/http/persistent'+ as normal.
16
+
17
+ == DESCRIPTION:
18
+
19
+ Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8.
20
+ It's thread-safe too!
21
+
22
+ Using persistent HTTP connections can dramatically increase the speed of HTTP.
23
+ Creating a new HTTP connection for every request involves an extra TCP
24
+ round-trip and causes TCP congestion avoidance negotiation to start over.
25
+
26
+ Net::HTTP supports persistent connections with some API methods but does not
27
+ handle reconnection gracefully. Net::HTTP::Persistent supports reconnection
28
+ and retry according to RFC 2616.
29
+
30
+ == FEATURES/PROBLEMS:
31
+
32
+ * Supports SSL
33
+ * Thread-safe
34
+ * Pure ruby
35
+ * Timeout-less speed boost for Ruby 1.8 (by Aaron Patterson)
36
+
37
+ == SYNOPSIS
38
+
39
+ The following example will make two requests to the same server. The
40
+ connection is kept alive between requests:
41
+
42
+ require 'net/http/persistent'
43
+
44
+ uri = URI 'http://example.com/awesome/web/service'
45
+
46
+ http = Net::HTTP::Persistent.new 'my_app_name'
47
+
48
+ # perform a GET
49
+ response = http.request uri
50
+
51
+ # create a POST
52
+ post_uri = uri + 'create'
53
+ post = Net::HTTP::Post.new post_uri.path
54
+ post.set_form_data 'some' => 'cool data'
55
+
56
+ # perform the POST, the URI is always required
57
+ response = http.request post_uri, post
58
+
59
+ # if you are done making http requests, or won't make requests for several
60
+ # minutes
61
+ http.shutdown
62
+
63
+ Please see the documentation on Net::HTTP::Persistent for more information,
64
+ including SSL connection verification, header handling and tunable options.
65
+
66
+ == INSTALL:
67
+
68
+ gem install net-http-persistent
69
+
70
+ == LICENSE:
71
+
72
+ (The MIT License)
73
+
74
+ Copyright (c) 2010 Eric Hodel, Aaron Patterson
75
+
76
+ Permission is hereby granted, free of charge, to any person obtaining
77
+ a copy of this software and associated documentation files (the
78
+ 'Software'), to deal in the Software without restriction, including
79
+ without limitation the rights to use, copy, modify, merge, publish,
80
+ distribute, sublicense, and/or sell copies of the Software, and to
81
+ permit persons to whom the Software is furnished to do so, subject to
82
+ the following conditions:
83
+
84
+ The above copyright notice and this permission notice shall be
85
+ included in all copies or substantial portions of the Software.
86
+
87
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
88
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
89
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
90
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
91
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
92
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
93
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.