iudex-jetty-httpclient 1.6.0-java → 1.7.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.
- checksums.yaml +4 -4
- data/History.rdoc +6 -4
- data/Manifest.txt +1 -1
- data/lib/iudex-jetty-httpclient/base.rb +1 -1
- data/lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.7.0.jar +0 -0
- data/pom.xml +3 -3
- data/test/test_httpclient.rb +44 -31
- metadata +18 -24
- data/lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.6.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c5cdb368688bc387baee76f1a82b5d4120a97c0
|
4
|
+
data.tar.gz: 3fe616acb19dd935affc9fa902eaf4f2b368a9e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a9a7de0d773a82214e944ce7dc0175cf80dcfddfbf6fc7816e3728150377ab495348eab016f1333c270f7bf33645652120980cc22f822033321c1e7185bdea6
|
7
|
+
data.tar.gz: 5e67ce18f0594975828b9a1ae55469db740924c57ef094c1396b2d511d9004af6067b825516944ba7cb90cb0d73ee044ad5ed10209cfbc13affbec5a2c81dd7d
|
data/History.rdoc
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
+
=== 1.7.0 (2015-5-3)
|
2
|
+
* Upgrade to iudex-* ~> 1.7 dependencies
|
3
|
+
* Upgrade/expand to rjack-jetty >= 9.2.7, < 9.4 (tested with 9.2.10,
|
4
|
+
9.3.0.0, M2 pre-release)
|
5
|
+
* Add POST method and request content support
|
6
|
+
|
1
7
|
=== 1.6.0 (2015-1-25)
|
2
|
-
Note: this release is at this time considered experimental or "alpha"
|
3
|
-
by comparison to 1.5 or 1.4
|
4
8
|
* Upgrade to rjack-jetty ~> 9.2.2. Java compile-time changes are
|
5
9
|
incompatible with all (7, 9.0, 9.1) prior versions. As such
|
6
10
|
this is a mandatory upgrade.
|
7
11
|
|
8
12
|
=== 1.5.0 (2014-3-27)
|
9
|
-
Note: this release is at this time considered experimental or "beta"
|
10
|
-
by comparison to 1.4.0
|
11
13
|
* Expand to >= 1.4.0, < 1.7 iudex dependencies
|
12
14
|
* Upgrade (mandatory) to rjack-jetty ~> 9.1.0 (java compile-time changes)
|
13
15
|
|
data/Manifest.txt
CHANGED
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.7.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.7.0</version>
|
15
15
|
<relativePath>..</relativePath>
|
16
16
|
</parent>
|
17
17
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<dependency>
|
21
21
|
<groupId>iudex</groupId>
|
22
22
|
<artifactId>iudex-http</artifactId>
|
23
|
-
<version>[1.
|
23
|
+
<version>[1.7.0,1.999)</version>
|
24
24
|
</dependency>
|
25
25
|
|
26
26
|
<dependency>
|
data/test/test_httpclient.rb
CHANGED
@@ -22,7 +22,6 @@ require 'iudex-http-test/helper'
|
|
22
22
|
require 'iudex-http-test/broken_server'
|
23
23
|
|
24
24
|
require 'iudex-jetty-httpclient'
|
25
|
-
require 'thread'
|
26
25
|
require 'cgi'
|
27
26
|
require 'uri'
|
28
27
|
|
@@ -328,8 +327,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
328
327
|
bs = BrokenServer.new
|
329
328
|
bs.start
|
330
329
|
|
331
|
-
sthread =
|
332
|
-
|
330
|
+
sthread = bs.accept_thread do |sock|
|
331
|
+
sock.write "FU Stinky\r\n"
|
333
332
|
end
|
334
333
|
|
335
334
|
with_new_client do |client|
|
@@ -350,8 +349,8 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
350
349
|
bs = BrokenServer.new
|
351
350
|
bs.start
|
352
351
|
|
353
|
-
sthread =
|
354
|
-
|
352
|
+
sthread = bs.accept_thread do |sock|
|
353
|
+
sock.close
|
355
354
|
end
|
356
355
|
|
357
356
|
with_new_client do |client|
|
@@ -376,18 +375,16 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
376
375
|
bs = BrokenServer.new
|
377
376
|
bs.start
|
378
377
|
|
379
|
-
sthread =
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
sock.close
|
390
|
-
end
|
378
|
+
sthread = bs.accept_thread do |sock|
|
379
|
+
sock.write "HTTP/1.1 200 OK\r\n"
|
380
|
+
sock.write "Content-Type: text/plain\r\n"
|
381
|
+
sock.write "Transfer-Encoding: chunked\r\n"
|
382
|
+
sock.write "\r\n"
|
383
|
+
sock.write "FF3DF\r\n"
|
384
|
+
sock.write "An incomplete chunk"
|
385
|
+
sock.write "An incomplete chunk"
|
386
|
+
sock.write "An incomplete chunk"
|
387
|
+
sock.close
|
391
388
|
end
|
392
389
|
|
393
390
|
with_new_client do |client|
|
@@ -407,19 +404,17 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
407
404
|
bs = BrokenServer.new
|
408
405
|
bs.start
|
409
406
|
|
410
|
-
sthread =
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
sock.close
|
422
|
-
end
|
407
|
+
sthread = bs.accept_thread do |sock|
|
408
|
+
sock.write "HTTP/1.1 302 Found\r\n"
|
409
|
+
sock.write "Location: http://localhost:54929/no-exist\r\n"
|
410
|
+
sock.write "Content-Type: text/plain\r\n"
|
411
|
+
sock.write "Transfer-Encoding: chunked\r\n"
|
412
|
+
sock.write "\r\n"
|
413
|
+
sock.write "FF3DF\r\n"
|
414
|
+
sock.write "An incomplete chunk"
|
415
|
+
sock.write "An incomplete chunk"
|
416
|
+
sock.write "An incomplete chunk"
|
417
|
+
sock.close
|
423
418
|
end
|
424
419
|
|
425
420
|
with_new_client do |client|
|
@@ -509,6 +504,22 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
509
504
|
end
|
510
505
|
end
|
511
506
|
|
507
|
+
def test_post
|
508
|
+
with_new_client do |client|
|
509
|
+
smod = Proc.new do |s|
|
510
|
+
s.method = HTTPSession::Method::POST
|
511
|
+
s.requestContent =
|
512
|
+
RequestContent.new( "a=1+2&b=3".to_java_bytes,
|
513
|
+
"application/x-www-form-urlencoded" )
|
514
|
+
end
|
515
|
+
with_session_handler( client, "/post_to", true, {}, smod ) do |s,x|
|
516
|
+
output_bomb( s ) unless s.status_code == 200
|
517
|
+
assert_equal( 200, s.status_code, "see bomb.out" )
|
518
|
+
assert_equal( %Q[{"a"=>"1 2", "b"=>"3"}], s.response_stream.to_io.read )
|
519
|
+
end
|
520
|
+
end
|
521
|
+
end
|
522
|
+
|
512
523
|
def sync( &block )
|
513
524
|
@rlock.synchronize( &block )
|
514
525
|
end
|
@@ -525,13 +536,15 @@ class TestHTTPClient < MiniTest::Unit::TestCase
|
|
525
536
|
"See bomb.out"
|
526
537
|
end
|
527
538
|
|
528
|
-
def with_session_handler( client, uri, wait = true,
|
539
|
+
def with_session_handler( client, uri, wait = true,
|
540
|
+
headers = {}, smod = nil, &block )
|
529
541
|
session = client.create_session
|
530
542
|
uri = "http://localhost:#{server.port}#{uri}" unless uri =~ /^http:/
|
531
543
|
session.url = uri
|
532
544
|
headers.each do |k,v|
|
533
545
|
session.add_request_header( Java::iudex.http.Header.new( k, v ) )
|
534
546
|
end
|
547
|
+
smod.call( session ) if smod
|
535
548
|
handler = TestHandler.new( &block )
|
536
549
|
client.request( session, handler )
|
537
550
|
if wait
|
metadata
CHANGED
@@ -1,22 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iudex-jetty-httpclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- David Kellum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- -
|
17
|
-
- !ruby/object:Gem::Version
|
18
|
-
version: 1.4.0
|
19
|
-
- - <
|
16
|
+
- - ~>
|
20
17
|
- !ruby/object:Gem::Version
|
21
18
|
version: '1.7'
|
22
19
|
name: iudex-http
|
@@ -24,26 +21,29 @@ dependencies:
|
|
24
21
|
type: :runtime
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 1.4.0
|
30
|
-
- - <
|
24
|
+
- - ~>
|
31
25
|
- !ruby/object:Gem::Version
|
32
26
|
version: '1.7'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
35
29
|
requirements:
|
36
|
-
- -
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 9.2.7
|
33
|
+
- - <
|
37
34
|
- !ruby/object:Gem::Version
|
38
|
-
version: 9.
|
35
|
+
version: '9.4'
|
39
36
|
name: rjack-jetty
|
40
37
|
prerelease: false
|
41
38
|
type: :runtime
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
44
|
-
- -
|
41
|
+
- - '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 9.2.7
|
44
|
+
- - <
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 9.
|
46
|
+
version: '9.4'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
@@ -76,9 +76,6 @@ dependencies:
|
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - ~>
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 1.4.0
|
81
|
-
- - <
|
82
79
|
- !ruby/object:Gem::Version
|
83
80
|
version: '1.7'
|
84
81
|
name: iudex-http-test
|
@@ -87,9 +84,6 @@ dependencies:
|
|
87
84
|
version_requirements: !ruby/object:Gem::Requirement
|
88
85
|
requirements:
|
89
86
|
- - ~>
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: 1.4.0
|
92
|
-
- - <
|
93
87
|
- !ruby/object:Gem::Version
|
94
88
|
version: '1.7'
|
95
89
|
- !ruby/object:Gem::Dependency
|
@@ -133,12 +127,12 @@ files:
|
|
133
127
|
- Manifest.txt
|
134
128
|
- README.rdoc
|
135
129
|
- Rakefile
|
136
|
-
- pom.xml
|
137
|
-
- lib/iudex-jetty-httpclient/base.rb
|
138
130
|
- lib/iudex-jetty-httpclient.rb
|
131
|
+
- lib/iudex-jetty-httpclient/base.rb
|
132
|
+
- lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.7.0.jar
|
133
|
+
- pom.xml
|
139
134
|
- test/setup.rb
|
140
135
|
- test/test_httpclient.rb
|
141
|
-
- lib/iudex-jetty-httpclient/iudex-jetty-httpclient-1.6.0.jar
|
142
136
|
homepage: http://iudex.gravitext.com
|
143
137
|
licenses:
|
144
138
|
- Apache-2.0
|
@@ -161,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
155
|
version: '0'
|
162
156
|
requirements: []
|
163
157
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.
|
158
|
+
rubygems_version: 2.4.5
|
165
159
|
signing_key:
|
166
160
|
specification_version: 4
|
167
161
|
summary: Iudex is a general purpose web crawler and feed processor in ruby/java.
|
Binary file
|