iudex-jetty-httpclient 1.3.0-java → 1.4.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +7 -0
- data/Manifest.txt +1 -1
- data/README.rdoc +1 -1
- data/lib/iudex-jetty-httpclient.rb +31 -21
- data/lib/iudex-jetty-httpclient/base.rb +2 -2
- data/lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.4.0.jar +0 -0
- data/pom.xml +4 -4
- data/test/setup.rb +4 -4
- data/test/test_httpclient.rb +46 -44
- metadata +13 -13
- data/lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.3.0.jar +0 -0
data/History.rdoc
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 1.4.0 (2013-10-29)
|
2
|
+
* Upgrade to rjack-jetty >= 9.0.0.5, < 9.1. This is a major
|
3
|
+
re-implementation throughout, with iudex configuration interface
|
4
|
+
changes. Internal redirects are no longer supported.
|
5
|
+
* Upgrade to iudex-* ~> 1.4.0 dependencies
|
6
|
+
* Upgrade to minitest ~> 4.7.4 (dev)
|
7
|
+
|
1
8
|
=== 1.3.0 (2012-11-8)
|
2
9
|
* Upgrade to logback ~> 1.5 (dev)
|
3
10
|
* Add Client.setCancelOnExpire and default true. This is a seemingly
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -11,7 +11,7 @@ iudex-http interfaces.
|
|
11
11
|
|
12
12
|
== License
|
13
13
|
|
14
|
-
Copyright (c) 2008-
|
14
|
+
Copyright (c) 2008-2013 David Kellum
|
15
15
|
|
16
16
|
Licensed under the Apache License, Version 2.0 (the "License"); you
|
17
17
|
may not use this file except in compliance with the License. You
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2013 David Kellum
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
5
|
# may not use this file except in compliance with the License. You
|
@@ -31,41 +31,51 @@ module Iudex
|
|
31
31
|
require "#{LIB_DIR}/iudex-jetty-httpclient-#{VERSION}.jar"
|
32
32
|
|
33
33
|
import 'iudex.jettyhttpclient.Client'
|
34
|
+
import 'org.eclipse.jetty.util.HttpCookieStore'
|
35
|
+
import 'org.eclipse.jetty.util.ssl.SslContextFactory'
|
34
36
|
|
35
37
|
include RJack::Jetty
|
36
38
|
|
37
|
-
def self.create_jetty_client(
|
38
|
-
cfg = { :timeout => 6_000,
|
39
|
-
:so_timeout => 5_000,
|
40
|
-
:connect_timeout => 3_000,
|
41
|
-
:idle_timeout => 6_000,
|
42
|
-
:max_retries => 1,
|
43
|
-
:max_redirects => 6,
|
44
|
-
:max_connections_per_address => 2,
|
45
|
-
:max_queue_size_per_address => 100,
|
46
|
-
:connect_blocking => false,
|
47
|
-
:handle_redirects_internal => false }
|
48
|
-
|
49
|
-
cfg = cfg.merge( opts )
|
50
|
-
cfg = Hooker.merge( [ :iudex, :jetty_httpclient ], cfg )
|
39
|
+
def self.create_jetty_client( cfg = {} )
|
51
40
|
|
52
|
-
|
41
|
+
ssl_factory = SslContextFactory.new
|
42
|
+
ctx_cfg = cfg.delete( :ssl_context )
|
43
|
+
ctx_cfg.each do |key,value|
|
44
|
+
ssl_factory.__send__( "set_#{key}", value )
|
45
|
+
end
|
53
46
|
|
54
|
-
|
47
|
+
jclient = HttpClient.new( ssl_factory )
|
55
48
|
|
56
49
|
cfg.each do |key,value|
|
57
50
|
jclient.__send__( "set_#{key}", value )
|
58
51
|
end
|
59
52
|
|
60
|
-
|
61
|
-
jclient.register_listener( 'org.eclipse.jetty.client.RedirectListener' )
|
62
|
-
end
|
53
|
+
jclient.cookie_store = HttpCookieStore::Empty.new
|
63
54
|
|
64
55
|
jclient
|
65
56
|
end
|
66
57
|
|
67
58
|
def self.create_client( opts = {} )
|
68
|
-
|
59
|
+
cfg = { :timeout => 6_000,
|
60
|
+
:connect_timeout => 3_000,
|
61
|
+
:idle_timeout => 6_000,
|
62
|
+
:max_connections_per_destination => 2,
|
63
|
+
:max_requests_queued_per_destination => 100,
|
64
|
+
:dispatch_io => true,
|
65
|
+
:follow_redirects => false,
|
66
|
+
:max_redirects => 6,
|
67
|
+
:ssl_context => { :trust_all => true } }
|
68
|
+
|
69
|
+
cfg = cfg.merge( opts )
|
70
|
+
cfg = Hooker.merge( [ :iudex, :jetty_httpclient ], cfg )
|
71
|
+
|
72
|
+
timeout = cfg.delete( :timeout )
|
73
|
+
|
74
|
+
client = Client.new( create_jetty_client( cfg ) )
|
75
|
+
|
76
|
+
client.timeout = timeout if timeout
|
77
|
+
|
78
|
+
client
|
69
79
|
end
|
70
80
|
|
71
81
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2013 David Kellum
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
5
|
# may not use this file except in compliance with the License. You
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
module Iudex
|
18
18
|
module JettyHTTPClient
|
19
|
-
VERSION = '1.
|
19
|
+
VERSION = '1.4.0'
|
20
20
|
|
21
21
|
LIB_DIR = File.dirname( __FILE__ ) # :nodoc:
|
22
22
|
end
|
Binary file
|
data/pom.xml
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
<groupId>iudex</groupId>
|
6
6
|
<artifactId>iudex-jetty-httpclient</artifactId>
|
7
7
|
<packaging>jar</packaging>
|
8
|
-
<version>1.
|
8
|
+
<version>1.4.0</version>
|
9
9
|
<name>Iudex Jetty HTTP Client Adaptor</name>
|
10
10
|
|
11
11
|
<parent>
|
12
12
|
<groupId>iudex</groupId>
|
13
13
|
<artifactId>iudex-parent</artifactId>
|
14
|
-
<version>1.
|
14
|
+
<version>1.4.0</version>
|
15
15
|
<relativePath>..</relativePath>
|
16
16
|
</parent>
|
17
17
|
|
@@ -20,13 +20,13 @@
|
|
20
20
|
<dependency>
|
21
21
|
<groupId>iudex</groupId>
|
22
22
|
<artifactId>iudex-http</artifactId>
|
23
|
-
<version>[1.
|
23
|
+
<version>[1.4.0,1.4.999)</version>
|
24
24
|
</dependency>
|
25
25
|
|
26
26
|
<dependency>
|
27
27
|
<groupId>org.eclipse.jetty</groupId>
|
28
28
|
<artifactId>jetty-client</artifactId>
|
29
|
-
<version>[
|
29
|
+
<version>[9.0.0.v20130308,9.0.9999)</version>
|
30
30
|
</dependency>
|
31
31
|
|
32
32
|
</dependencies>
|
data/test/setup.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2013 David Kellum
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
5
|
# may not use this file except in compliance with the License. You
|
@@ -35,10 +35,10 @@ module TestSetup
|
|
35
35
|
def puts( *a ); $stdout.puts( *a ); end
|
36
36
|
end
|
37
37
|
MiniTest::Unit.output = TestOut.new
|
38
|
-
Logback[ 'org.eclipse.jetty
|
39
|
-
Logback::WARN
|
38
|
+
Logback[ 'org.eclipse.jetty' ].level = :warn
|
40
39
|
else
|
41
|
-
Logback.
|
40
|
+
Logback[ 'org.eclipse.jetty' ].level = :info
|
41
|
+
Logback[ 'iudex.jettyhttpclient' ].level = :debug
|
42
42
|
end
|
43
43
|
|
44
44
|
ARGV.delete( '--debug' )
|
data/test/test_httpclient.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env jruby
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c) 2008-
|
4
|
+
# Copyright (c) 2008-2013 David Kellum
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
7
7
|
# may not use this file except in compliance with the License. You
|
@@ -37,8 +37,9 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
37
37
|
import 'java.net.UnknownHostException'
|
38
38
|
import 'java.net.URISyntaxException'
|
39
39
|
import 'java.io.IOException'
|
40
|
-
import 'java.lang.IllegalStateException'
|
41
40
|
import 'java.nio.channels.UnresolvedAddressException'
|
41
|
+
import 'org.eclipse.jetty.client.HttpResponseException'
|
42
|
+
import 'iudex.jettyhttpclient.Client$SessionAbort'
|
42
43
|
|
43
44
|
CustomUnit.register
|
44
45
|
|
@@ -56,22 +57,18 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
56
57
|
import 'java.util.concurrent.ThreadPoolExecutor'
|
57
58
|
import 'java.util.concurrent.ArrayBlockingQueue'
|
58
59
|
import 'java.util.concurrent.TimeUnit'
|
59
|
-
import 'org.eclipse.jetty.util.thread.ExecutorThreadPool'
|
60
60
|
|
61
61
|
def test_custom_executor
|
62
|
-
#FIXME: A bit shaky, fails under 3 threads?
|
63
62
|
executor = ThreadPoolExecutor.new( 3, 10,
|
64
63
|
10, TimeUnit::SECONDS,
|
65
64
|
ArrayBlockingQueue.new( 10 ) )
|
66
|
-
|
67
|
-
|
68
|
-
with_new_client( :thread_pool => pool ) do |client|
|
65
|
+
with_new_client( :executor => executor ) do |client|
|
69
66
|
with_session_handler( client, "/index" ) do |s,x|
|
70
67
|
assert_equal( 200, s.status_code )
|
71
68
|
end
|
72
69
|
end
|
73
70
|
|
74
|
-
|
71
|
+
executor.shutdown
|
75
72
|
end
|
76
73
|
|
77
74
|
def test_200
|
@@ -109,11 +106,11 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
109
106
|
req,rsp = nil
|
110
107
|
with_new_client do |client|
|
111
108
|
with_session_handler( client,
|
112
|
-
"/echo/header/Accept?noop=3",
|
109
|
+
"/echo/header/Accept?noop=3%267&o=9",
|
113
110
|
true,
|
114
111
|
{ 'Accept' => 'text/plain;moo' } ) do |s,x|
|
115
112
|
assert_equal( 200, s.status_code )
|
116
|
-
assert_equal( 'GET /echo/header/Accept?noop=3',
|
113
|
+
assert_equal( 'GET /echo/header/Accept?noop=3%267&o=9',
|
117
114
|
find_header( s.request_headers, "Request-Line" ) )
|
118
115
|
assert_equal( 'text/plain;moo',
|
119
116
|
find_header( s.request_headers, 'Accept' ) )
|
@@ -130,7 +127,6 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
130
127
|
def test_unknown_host
|
131
128
|
with_new_client( :timeout => 12_000,
|
132
129
|
:connect_timeout => 10_000,
|
133
|
-
:so_timeout => 10_000,
|
134
130
|
:idle_timeout => 10_000 ) do |client|
|
135
131
|
with_session_handler( client,
|
136
132
|
"http://9xa9.a7v6a7lop-9m9q-w12.com" ) do |s,x|
|
@@ -190,12 +186,20 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
190
186
|
assert_kind_of( TimeoutException, x )
|
191
187
|
end
|
192
188
|
end
|
193
|
-
|
194
|
-
|
189
|
+
end
|
190
|
+
|
191
|
+
def test_slow_timeout
|
192
|
+
with_new_client( :short => true ) do |client|
|
193
|
+
with_session_handler( client, "/slow" ) do |s,x|
|
194
|
+
assert_equal( HTTPSession::TIMEOUT, s.status_code )
|
195
|
+
assert_kind_of( TimeoutException, x )
|
196
|
+
end
|
197
|
+
end
|
195
198
|
end
|
196
199
|
|
197
200
|
def test_redirect
|
198
|
-
|
201
|
+
skip "redirect url not accessible"
|
202
|
+
with_new_client( :follow_redirects => true ) do |client|
|
199
203
|
with_session_handler( client, "/" ) do |s,x|
|
200
204
|
assert_equal( 200, s.status_code )
|
201
205
|
assert_equal( 'http://localhost:19292/index', s.url )
|
@@ -204,7 +208,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
204
208
|
end
|
205
209
|
|
206
210
|
def test_redirect_with_query_string
|
207
|
-
|
211
|
+
skip "redirect url not accessible"
|
212
|
+
with_new_client( :follow_redirects => true ) do |client|
|
208
213
|
with_session_handler( client, "/redirects/multi/2?sleep=0" ) do |s,x|
|
209
214
|
assert_equal( 200, s.status_code )
|
210
215
|
assert_equal( 'http://localhost:19292/redirects/multi/1?sleep=0',
|
@@ -216,7 +221,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
216
221
|
end
|
217
222
|
|
218
223
|
def test_redirect_multi_host
|
219
|
-
|
224
|
+
skip "redirect url not accessible"
|
225
|
+
with_new_client( :follow_redirects => true ) do |client|
|
220
226
|
rurl = 'http://127.0.0.1:19292/index'
|
221
227
|
rurl_e = CGI.escape( rurl )
|
222
228
|
with_session_handler( client, "/redirect?loc=#{rurl_e}" ) do |s,x|
|
@@ -228,7 +234,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
228
234
|
|
229
235
|
def test_redirect_multi_host_bad
|
230
236
|
skip( "Error: -1 java.lang.NumberFormatException" )
|
231
|
-
with_new_client( :
|
237
|
+
with_new_client( :follow_redirects => true ) do |client|
|
232
238
|
rurl = 'http://localhost:19292/index'
|
233
239
|
url = "http://127.0.0.1:19292?redirect?loc=" + CGI.escape( rurl )
|
234
240
|
# Note >?<redirect? above
|
@@ -242,7 +248,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
242
248
|
end
|
243
249
|
|
244
250
|
def test_redirect_multi_host_3
|
245
|
-
|
251
|
+
skip "redirect url not accessible"
|
252
|
+
with_new_client( :follow_redirects => true ) do |client|
|
246
253
|
rurl = 'http://localhost:19292/index'
|
247
254
|
url = "http://127.0.0.1:19292/redirect?loc=" + CGI.escape( rurl )
|
248
255
|
url = "/redirect?loc=" + CGI.escape( url )
|
@@ -255,7 +262,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
255
262
|
end
|
256
263
|
|
257
264
|
def test_redirect_multi_host_fragment
|
258
|
-
|
265
|
+
skip "redirect url not accessible"
|
266
|
+
with_new_client( :follow_redirects => true ) do |client|
|
259
267
|
rurl = '/index#!foo'
|
260
268
|
url = "/redirect?loc=" + CGI.escape( rurl )
|
261
269
|
|
@@ -267,7 +275,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
267
275
|
end
|
268
276
|
|
269
277
|
def test_redirect_bad_host
|
270
|
-
|
278
|
+
skip( "FIXME hangs" )
|
279
|
+
with_new_client( :follow_redirects => true ) do |client|
|
271
280
|
rurl = CGI.escape( 'http://\bad.com/' )
|
272
281
|
with_session_handler( client, "/redirect?loc=#{ rurl }" ) do |s,x|
|
273
282
|
assert_equal( HTTPSession::INVALID_REDIRECT_URL, s.status_code )
|
@@ -277,8 +286,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
277
286
|
end
|
278
287
|
|
279
288
|
def test_multi_redirect
|
280
|
-
|
281
|
-
|
289
|
+
skip "redirect url not accessible"
|
290
|
+
with_new_client( :follow_redirects => true ) do |client|
|
282
291
|
with_session_handler( client, "/redirects/multi/6" ) do |s,x|
|
283
292
|
assert_equal( 200, s.status_code )
|
284
293
|
assert_nil x
|
@@ -297,23 +306,21 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
297
306
|
end
|
298
307
|
|
299
308
|
def test_too_many_redirects
|
300
|
-
with_new_client( :
|
309
|
+
with_new_client( :follow_redirects => true,
|
301
310
|
:max_redirects => 18 ) do |client|
|
302
|
-
#FIXME: One redirect off somewhere? 19 fails.
|
303
311
|
with_session_handler( client, "/redirects/multi/20" ) do |s,x|
|
304
|
-
assert_equal(
|
312
|
+
assert_equal( HTTPSession::MAX_REDIRECTS_EXCEEDED, s.status_code )
|
305
313
|
end
|
306
314
|
end
|
307
315
|
end
|
308
316
|
|
309
317
|
def test_redirect_timeout
|
310
318
|
skip( "Unreliable timeout with redirects, timing dependent" )
|
311
|
-
with_new_client( :
|
319
|
+
with_new_client( :follow_redirects => true,
|
312
320
|
:short => true ) do |client|
|
313
321
|
with_session_handler( client, "/redirects/multi/3?sleep=0.40" ) do |s,x|
|
314
322
|
assert_instance_of( TimeoutException, x )
|
315
323
|
end
|
316
|
-
sleep 0.80
|
317
324
|
end
|
318
325
|
end
|
319
326
|
|
@@ -325,10 +332,11 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
325
332
|
bs.accept { |sock| sock.write "FU Stinky\r\n" }
|
326
333
|
end
|
327
334
|
|
328
|
-
#FIXME: IllegalStateException on bad HTTP response line?
|
329
335
|
with_new_client do |client|
|
330
336
|
with_session_handler( client, "http://localhost:19293/" ) do |s,x|
|
331
|
-
|
337
|
+
assert_match( /(EofException|bad response|ClosedChannelException)/i,
|
338
|
+
x.to_string )
|
339
|
+
assert_equal( -1, s.status_code )
|
332
340
|
end
|
333
341
|
end
|
334
342
|
|
@@ -348,7 +356,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
348
356
|
|
349
357
|
with_new_client do |client|
|
350
358
|
with_session_handler( client, "http://localhost:19293/" ) do |s,x|
|
351
|
-
assert_match( /EofException/i, x.class.name )
|
359
|
+
assert_match( /EofException|ClosedChannelException/i, x.class.name )
|
352
360
|
end
|
353
361
|
end
|
354
362
|
|
@@ -378,7 +386,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
378
386
|
|
379
387
|
with_new_client do |client|
|
380
388
|
with_session_handler( client, "http://localhost:19293/" ) do |s,x|
|
381
|
-
assert_match( /EofException/i, x.class.name )
|
389
|
+
assert_match( /EofException|ClosedChannelException/i, x.class.name )
|
382
390
|
end
|
383
391
|
end
|
384
392
|
|
@@ -409,7 +417,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
409
417
|
|
410
418
|
with_new_client do |client|
|
411
419
|
with_session_handler( client, "http://localhost:19293/" ) do |s,x|
|
412
|
-
assert_match( /EofException/i, x.class.name )
|
420
|
+
assert_match( /EofException|ClosedChannelException/i, x.class.name )
|
413
421
|
end
|
414
422
|
end
|
415
423
|
|
@@ -422,9 +430,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
422
430
|
def test_concurrent
|
423
431
|
with_new_client( :timeout => 18_000,
|
424
432
|
:connect_timeout => 15_000,
|
425
|
-
:so_timeout => 12_000,
|
426
433
|
:idle_timeout => 12_000,
|
427
|
-
:
|
434
|
+
:max_connections_per_destination => 4 ) do |client|
|
428
435
|
|
429
436
|
resps = []
|
430
437
|
sessions = (1..19).map do |i|
|
@@ -443,12 +450,11 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
443
450
|
end
|
444
451
|
end
|
445
452
|
|
446
|
-
def
|
453
|
+
def test_maximum_connections_per_destination
|
447
454
|
with_new_client( :timeout => 12_000,
|
448
455
|
:connect_timeout => 10_000,
|
449
|
-
:so_timeout => 10_000,
|
450
456
|
:idle_timeout => 10_000,
|
451
|
-
:
|
457
|
+
:max_connections_per_destination => 2 ) do |client|
|
452
458
|
|
453
459
|
resps = []
|
454
460
|
sessions = (1..7).map do |i|
|
@@ -469,7 +475,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
469
475
|
def test_abort_when_too_large
|
470
476
|
with_new_client do |client|
|
471
477
|
with_session_handler( client, "/giant" ) do |s,x|
|
472
|
-
|
478
|
+
assert_kind_of( SessionAbort, x )
|
473
479
|
assert_equal( HTTPSession::TOO_LARGE, s.status_code )
|
474
480
|
end
|
475
481
|
end
|
@@ -479,7 +485,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
479
485
|
with_new_client do |client|
|
480
486
|
client.max_content_length = 1
|
481
487
|
with_session_handler( client, "/atom.xml" ) do |s,x|
|
482
|
-
|
488
|
+
assert_kind_of( SessionAbort, x )
|
483
489
|
assert_equal( HTTPSession::TOO_LARGE_LENGTH, s.status_code )
|
484
490
|
end
|
485
491
|
end
|
@@ -489,7 +495,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
489
495
|
with_new_client do |client|
|
490
496
|
client.accepted_content_types = ContentTypeSet.new( [ "gold/*" ] )
|
491
497
|
with_session_handler( client, "/giant" ) do |s,x|
|
492
|
-
|
498
|
+
assert_kind_of( SessionAbort, x )
|
493
499
|
assert_equal( HTTPSession::NOT_ACCEPTED, s.status_code )
|
494
500
|
end
|
495
501
|
end
|
@@ -531,18 +537,14 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
531
537
|
def with_new_client( opts = {} )
|
532
538
|
o = if opts.delete( :short )
|
533
539
|
{ :timeout => 400,
|
534
|
-
:so_timeout => 200,
|
535
540
|
:connect_timeout => 200,
|
536
541
|
:idle_timeout => 200 }
|
537
542
|
else
|
538
543
|
{ :timeout => 5000,
|
539
|
-
:so_timeout => 4000,
|
540
544
|
:connect_timeout => 3000,
|
541
545
|
:idle_timeout => 2000 }
|
542
546
|
end
|
543
547
|
|
544
|
-
o = o.merge( { :max_retries => 0,
|
545
|
-
:connect_blocking => false } )
|
546
548
|
o = o.merge( opts )
|
547
549
|
|
548
550
|
client = JettyHTTPClient.create_client( o )
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: iudex-jetty-httpclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.4.0
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- David Kellum
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: iudex-http
|
@@ -17,13 +17,13 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.
|
20
|
+
version: 1.4.0
|
21
21
|
none: false
|
22
22
|
requirement: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.4.0
|
27
27
|
none: false
|
28
28
|
prerelease: false
|
29
29
|
type: :runtime
|
@@ -33,19 +33,19 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - ! '>='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: 9.0.0.5
|
37
37
|
- - <
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '9.1'
|
40
40
|
none: false
|
41
41
|
requirement: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 9.0.0.5
|
46
46
|
- - <
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '9.1'
|
49
49
|
none: false
|
50
50
|
prerelease: false
|
51
51
|
type: :runtime
|
@@ -71,13 +71,13 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - ~>
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 4.7.4
|
75
75
|
none: false
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - ~>
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 4.7.4
|
81
81
|
none: false
|
82
82
|
prerelease: false
|
83
83
|
type: :development
|
@@ -87,13 +87,13 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - ~>
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.
|
90
|
+
version: 1.4.0
|
91
91
|
none: false
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 1.4.0
|
97
97
|
none: false
|
98
98
|
prerelease: false
|
99
99
|
type: :development
|
@@ -147,7 +147,7 @@ files:
|
|
147
147
|
- lib/iudex-jetty-httpclient.rb
|
148
148
|
- test/setup.rb
|
149
149
|
- test/test_httpclient.rb
|
150
|
-
- lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.
|
150
|
+
- lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.4.0.jar
|
151
151
|
homepage: http://iudex.gravitext.com
|
152
152
|
licenses: []
|
153
153
|
post_install_message:
|
Binary file
|