httpclient 2.3.4.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/{README.txt → README.md} +217 -56
- data/lib/httpclient.rb +11 -7
- data/lib/httpclient/auth.rb +242 -158
- data/lib/httpclient/cacert.p7s +3865 -1911
- data/lib/httpclient/cookie.rb +1 -1
- data/lib/httpclient/http.rb +2 -0
- data/lib/httpclient/session.rb +10 -7
- data/lib/httpclient/ssl_config.rb +12 -5
- data/lib/httpclient/version.rb +1 -1
- data/sample/api_rest.pdf +19942 -24
- data/sample/oauth_twitter.rb +4 -4
- data/sample/post.rb +11 -0
- data/test/client-pass.key +18 -0
- data/test/helper.rb +3 -3
- data/test/reports/TEST-HTTPAccess2-TestClient.xml +221 -0
- data/test/reports/TEST-TestCookie.xml +21 -0
- data/test/reports/TEST-TestCookieManager.xml +35 -0
- data/test/reports/TEST-TestHTTPClient.xml +147 -0
- data/test/reports/TEST-TestSSL.0.xml +0 -0
- data/test/reports/TEST-TestSSL.1.xml +81 -0
- data/test/reports/TEST-TestSSL.xml +0 -0
- data/test/test_auth.rb +59 -2
- data/test/test_cookie.rb +21 -0
- data/test/test_httpclient.rb +33 -1
- data/test/test_ssl.rb +1 -1
- metadata +55 -52
File without changes
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<testsuite name="TestSSL" tests="6" time="1.364721588" failures="0" errors="0" skipped="0" assertions="31">
|
3
|
+
<testcase name="test_ciphers" time="0.314971752" assertions="4">
|
4
|
+
</testcase>
|
5
|
+
<testcase name="test_debug_dev" time="0.180549809" assertions="2">
|
6
|
+
</testcase>
|
7
|
+
<testcase name="test_options" time="0.109182463" assertions="9">
|
8
|
+
</testcase>
|
9
|
+
<testcase name="test_set_default_paths" time="0.197267769" assertions="1">
|
10
|
+
</testcase>
|
11
|
+
<testcase name="test_sync" time="0.24674528" assertions="2">
|
12
|
+
</testcase>
|
13
|
+
<testcase name="test_verification" time="0.312765839" assertions="13">
|
14
|
+
</testcase>
|
15
|
+
<system-out>
|
16
|
+
["client", false, #<OpenSSL::X509::StoreContext:0x007fda64c64030>]
|
17
|
+
["client", false, #<OpenSSL::X509::StoreContext:0x007fda64b474b8>]
|
18
|
+
["client", false, #<OpenSSL::X509::StoreContext:0x007fda64c4ede8>]
|
19
|
+
["client", true, #<OpenSSL::X509::StoreContext:0x007fda64c254e8>]
|
20
|
+
["client", true, #<OpenSSL::X509::StoreContext:0x007fda64c25038>]
|
21
|
+
["client", true, #<OpenSSL::X509::StoreContext:0x007fda64c24c28>]
|
22
|
+
["client", false, #<OpenSSL::X509::StoreContext:0x007fda64bb0260>]
|
23
|
+
["client", true, #<OpenSSL::X509::StoreContext:0x007fda64ba7ae8>]
|
24
|
+
["client", true, #<OpenSSL::X509::StoreContext:0x007fda64ba7638>]
|
25
|
+
["client", true, #<OpenSSL::X509::StoreContext:0x007fda64ba7278>]
|
26
|
+
["client", false, #<OpenSSL::X509::StoreContext:0x007fda64b7d0b8>]
|
27
|
+
["client", false, #<OpenSSL::X509::StoreContext:0x007fda64b715b0>]
|
28
|
+
</system-out>
|
29
|
+
<system-err>
|
30
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
31
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
32
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/ssl_config.rb:285 - SSL_CTX_set_cipher_list: no cipher match
|
33
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept SYSCALL returned=5 errno=0 state=unknown state
|
34
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept SYSCALL returned=5 errno=0 state=unknown state
|
35
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_CTX_set_cipher_list: no cipher match
|
36
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
37
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
38
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
39
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
40
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
41
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
42
|
+
Exception `IOError' at /usr/local/lib/ruby/2.1.0/webrick/server.rb:170 - closed stream
|
43
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:303 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
44
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
45
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
46
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
47
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
48
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
49
|
+
Exception `IOError' at /usr/local/lib/ruby/2.1.0/webrick/server.rb:170 - closed stream
|
50
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
51
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
52
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
53
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
54
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:303 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
55
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
56
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
57
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
58
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:303 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
59
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
60
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
61
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
62
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:303 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
63
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
64
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
65
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
66
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
67
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
68
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:303 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
69
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
70
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
71
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
72
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
73
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
74
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:303 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
75
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:194 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
76
|
+
Exception `OpenSSL::SSL::SSLError' at /usr/local/lib/ruby/2.1.0/openssl/ssl.rb:198 - SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: sslv3 alert bad certificate
|
77
|
+
Exception `OpenSSL::SSL::SSLError' at /mnt/home/nahi/git/httpclient/lib/httpclient/session.rb:167 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
78
|
+
Exception `EOFError' at /usr/local/lib/ruby/2.1.0/openssl/buffering.rb:61 - end of file reached
|
79
|
+
Exception `WEBrick::HTTPStatus::EOFError' at /usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError
|
80
|
+
</system-err>
|
81
|
+
</testsuite>
|
File without changes
|
data/test/test_auth.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
require File.expand_path('helper', File.dirname(__FILE__))
|
2
2
|
require 'digest/md5'
|
3
|
+
require 'rack'
|
4
|
+
require 'rack/lint'
|
5
|
+
require 'rack/showexceptions'
|
6
|
+
require 'rack-ntlm'
|
3
7
|
|
4
8
|
class TestAuth < Test::Unit::TestCase
|
5
9
|
include Helper
|
@@ -34,6 +38,22 @@ class TestAuth < Test::Unit::TestCase
|
|
34
38
|
'/digest_sess_auth',
|
35
39
|
WEBrick::HTTPServlet::ProcHandler.new(method(:do_digest_sess_auth).to_proc)
|
36
40
|
)
|
41
|
+
# NTLM endpoint
|
42
|
+
ntlm_handler = Rack::Handler::WEBrick.new(@server,
|
43
|
+
Rack::Builder.app do
|
44
|
+
use Rack::ShowExceptions
|
45
|
+
use Rack::ContentLength
|
46
|
+
use Rack::Ntlm, {:uri_pattern => /.*/, :auth => {:username => "admin", :password => "admin"}}
|
47
|
+
run lambda { |env| [200, { 'Content-Type' => 'text/html' }, ['ntlm_auth OK']] }
|
48
|
+
end
|
49
|
+
)
|
50
|
+
@server.mount(
|
51
|
+
'/ntlm_auth',
|
52
|
+
WEBrick::HTTPServlet::ProcHandler.new(Proc.new do |req, res|
|
53
|
+
ntlm_handler.service(req, res)
|
54
|
+
end)
|
55
|
+
)
|
56
|
+
# Htpasswd
|
37
57
|
htpasswd = File.join(File.dirname(__FILE__), 'htpasswd')
|
38
58
|
htpasswd_userdb = WEBrick::HTTPAuth::Htpasswd.new(htpasswd)
|
39
59
|
htdigest = File.join(File.dirname(__FILE__), 'htdigest')
|
@@ -95,6 +115,16 @@ class TestAuth < Test::Unit::TestCase
|
|
95
115
|
res.body = 'digest_sess_auth OK' + req.query_string.to_s
|
96
116
|
end
|
97
117
|
|
118
|
+
# TODO: disables this test; it causes an exception because it seems
|
119
|
+
# that there's version incompatibility between
|
120
|
+
# rack-ntlm and rack-ntlm-test-services.
|
121
|
+
def __test_ntlm_auth
|
122
|
+
c = HTTPClient.new
|
123
|
+
c.set_auth("http://localhost:#{serverport}/ntlm_auth", 'admin', 'admin')
|
124
|
+
assert_equal('ntlm_auth OK', c.get_content("http://localhost:#{serverport}/ntlm_auth"))
|
125
|
+
puts c.inspect
|
126
|
+
end
|
127
|
+
|
98
128
|
def test_basic_auth
|
99
129
|
c = HTTPClient.new
|
100
130
|
c.set_auth("http://localhost:#{serverport}/", 'admin', 'admin')
|
@@ -110,7 +140,6 @@ class TestAuth < Test::Unit::TestCase
|
|
110
140
|
def test_BASIC_auth
|
111
141
|
c = HTTPClient.new
|
112
142
|
webrick_backup = @basic_auth.instance_eval { @auth_scheme }
|
113
|
-
#httpaccess2_backup = c.www_auth.basic_auth.instance_eval { @scheme }
|
114
143
|
begin
|
115
144
|
@basic_auth.instance_eval { @auth_scheme = "BASIC" }
|
116
145
|
c.www_auth.basic_auth.instance_eval { @scheme = "BASIC" }
|
@@ -118,7 +147,35 @@ class TestAuth < Test::Unit::TestCase
|
|
118
147
|
assert_equal('basic_auth OK', c.get_content("http://localhost:#{serverport}/basic_auth"))
|
119
148
|
ensure
|
120
149
|
@basic_auth.instance_eval { @auth_scheme = webrick_backup }
|
121
|
-
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# To work this test consistently on CRuby you can to add 'Thread.pass' in
|
154
|
+
# @challenge iteration at BasicAuth#get like;
|
155
|
+
#
|
156
|
+
# return nil unless @challenge.find { |uri, ok|
|
157
|
+
# Thread.pass
|
158
|
+
# Util.uri_part_of(target_uri, uri) and ok
|
159
|
+
# }
|
160
|
+
def test_BASIC_auth_multi_thread
|
161
|
+
c = HTTPClient.new
|
162
|
+
webrick_backup = @basic_auth.instance_eval { @auth_scheme }
|
163
|
+
begin
|
164
|
+
@basic_auth.instance_eval { @auth_scheme = "BASIC" }
|
165
|
+
c.www_auth.basic_auth.instance_eval { @scheme = "BASIC" }
|
166
|
+
c.set_auth("http://localhost:#{serverport}/", 'admin', 'admin')
|
167
|
+
|
168
|
+
threads = 100.times.map { |idx|
|
169
|
+
Thread.new(idx) { |idx2|
|
170
|
+
Thread.abort_on_exception = true
|
171
|
+
Thread.pass
|
172
|
+
c.get("http://localhost:#{serverport}/basic_auth?#{idx2}")
|
173
|
+
}
|
174
|
+
}.map { |t|
|
175
|
+
t.join
|
176
|
+
}
|
177
|
+
ensure
|
178
|
+
@basic_auth.instance_eval { @auth_scheme = webrick_backup }
|
122
179
|
end
|
123
180
|
end
|
124
181
|
|
data/test/test_cookie.rb
CHANGED
@@ -235,6 +235,27 @@ class TestCookieManager < Test::Unit::TestCase
|
|
235
235
|
assert_equal("/", cookie.path)
|
236
236
|
end
|
237
237
|
|
238
|
+
def test_parse_after_expiration
|
239
|
+
str = "inkid=n92b0ADOgACIgUb9lsjHqAAAHu2a; expires=Wed, 01-Dec-2010 00:00:00 GMT; path=/"
|
240
|
+
@cm.parse(str, urify('http://www.test.jp'))
|
241
|
+
cookie = @cm.cookies[0]
|
242
|
+
assert_instance_of(WebAgent::Cookie, cookie)
|
243
|
+
assert_equal("inkid", cookie.name)
|
244
|
+
assert_equal("n92b0ADOgACIgUb9lsjHqAAAHu2a", cookie.value)
|
245
|
+
assert_equal(Time.gm(2010, 12, 1, 0,0,0), cookie.expires)
|
246
|
+
assert_equal("/", cookie.path)
|
247
|
+
|
248
|
+
time = Time.at(Time.now.to_i + 60).utc
|
249
|
+
expires = time.strftime("%a, %d-%b-%Y %H:%M:%S GMT")
|
250
|
+
str = "inkid=n92b0ADOgACIgUb9lsjHqAAAHu2a; expires=#{expires}; path=/"
|
251
|
+
@cm.parse(str, urify('http://www.test.jp'))
|
252
|
+
cookie = @cm.cookies[0]
|
253
|
+
assert_equal("inkid", cookie.name)
|
254
|
+
assert_equal("n92b0ADOgACIgUb9lsjHqAAAHu2a", cookie.value)
|
255
|
+
assert_equal(time, cookie.expires)
|
256
|
+
assert_equal("/", cookie.path)
|
257
|
+
end
|
258
|
+
|
238
259
|
def test_find_cookie()
|
239
260
|
str = "xmen=off,0,0,1; path=/; domain=.excite2.co.jp; expires=Wednesday, 31-Dec-2037 12:00:00 GMT"
|
240
261
|
@cm.parse(str, urify("http://www.excite2.co.jp/"))
|
data/test/test_httpclient.rb
CHANGED
@@ -678,7 +678,19 @@ EOS
|
|
678
678
|
assert_nil(res.content)
|
679
679
|
end
|
680
680
|
|
681
|
-
def
|
681
|
+
def test_get_with_block_arity_2
|
682
|
+
called = false
|
683
|
+
res = @client.get(serverurl + 'servlet') { |res, str|
|
684
|
+
assert_equal(200, res.status)
|
685
|
+
assert_equal('get', str)
|
686
|
+
called = true
|
687
|
+
}
|
688
|
+
assert(called)
|
689
|
+
# res does not have a content
|
690
|
+
assert_nil(res.content)
|
691
|
+
end
|
692
|
+
|
693
|
+
def test_get_with_block_string_recycle
|
682
694
|
@client.read_block_size = 2
|
683
695
|
body = []
|
684
696
|
res = @client.get(serverurl + 'servlet') { |str|
|
@@ -688,6 +700,26 @@ EOS
|
|
688
700
|
assert_equal("get", body.join) # Was "tt" by String object recycle...
|
689
701
|
end
|
690
702
|
|
703
|
+
def test_get_with_block_chunked_string_recycle
|
704
|
+
server = TCPServer.open('localhost', 0)
|
705
|
+
server_thread = Thread.new {
|
706
|
+
Thread.abort_on_exception = true
|
707
|
+
sock = server.accept
|
708
|
+
create_keepalive_thread(1, sock)
|
709
|
+
}
|
710
|
+
url = "http://localhost:#{server.addr[1]}/"
|
711
|
+
body = []
|
712
|
+
begin
|
713
|
+
res = @client.get(url + 'chunked') { |str|
|
714
|
+
body << str
|
715
|
+
}
|
716
|
+
ensure
|
717
|
+
server.close
|
718
|
+
server_thread.join
|
719
|
+
end
|
720
|
+
assert_equal('abcdefghijklmnopqrstuvwxyz1234567890abcdef', body.join)
|
721
|
+
end
|
722
|
+
|
691
723
|
def test_post
|
692
724
|
assert_equal("post", @client.post(serverurl + 'servlet').content[0, 4])
|
693
725
|
param = {'1'=>'2', '3'=>'4'}
|
data/test/test_ssl.rb
CHANGED
@@ -134,7 +134,7 @@ end
|
|
134
134
|
|
135
135
|
def test_ciphers
|
136
136
|
cfg = @client.ssl_config
|
137
|
-
cfg.set_client_cert_file(path('client.cert'), path('client.key'))
|
137
|
+
cfg.set_client_cert_file(path('client.cert'), path('client-pass.key'), 'pass4key')
|
138
138
|
cfg.add_trust_ca(path('ca.cert'))
|
139
139
|
cfg.add_trust_ca(path('subca.cert'))
|
140
140
|
cfg.timeout = 123
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Hiroshi Nakamura
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-06-08 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description:
|
15
14
|
email: nahi@ruby-lang.org
|
@@ -18,91 +17,95 @@ executables:
|
|
18
17
|
extensions: []
|
19
18
|
extra_rdoc_files: []
|
20
19
|
files:
|
20
|
+
- README.md
|
21
21
|
- bin/httpclient
|
22
|
-
- lib/httpclient.rb
|
23
|
-
- lib/http-access2.rb
|
24
22
|
- lib/hexdump.rb
|
25
|
-
- lib/
|
26
|
-
- lib/
|
27
|
-
- lib/
|
28
|
-
- lib/httpclient
|
29
|
-
- lib/httpclient/
|
30
|
-
- lib/httpclient/
|
23
|
+
- lib/http-access2.rb
|
24
|
+
- lib/http-access2/cookie.rb
|
25
|
+
- lib/http-access2/http.rb
|
26
|
+
- lib/httpclient.rb
|
27
|
+
- lib/httpclient/auth.rb
|
28
|
+
- lib/httpclient/cacert.p7s
|
31
29
|
- lib/httpclient/connection.rb
|
32
30
|
- lib/httpclient/cookie.rb
|
31
|
+
- lib/httpclient/http.rb
|
32
|
+
- lib/httpclient/include_client.rb
|
33
|
+
- lib/httpclient/session.rb
|
34
|
+
- lib/httpclient/ssl_config.rb
|
35
|
+
- lib/httpclient/timeout.rb
|
33
36
|
- lib/httpclient/util.rb
|
34
|
-
- lib/httpclient/
|
35
|
-
- lib/httpclient/cacert.p7s
|
37
|
+
- lib/httpclient/version.rb
|
36
38
|
- lib/oauthclient.rb
|
37
|
-
-
|
38
|
-
-
|
39
|
+
- sample/api_rest.pdf
|
40
|
+
- sample/async.rb
|
41
|
+
- sample/auth.rb
|
42
|
+
- sample/cookie.rb
|
43
|
+
- sample/dav.rb
|
44
|
+
- sample/howto.rb
|
45
|
+
- sample/oauth_buzz.rb
|
46
|
+
- sample/oauth_friendfeed.rb
|
39
47
|
- sample/oauth_salesforce_10.rb
|
48
|
+
- sample/oauth_twitter.rb
|
49
|
+
- sample/post.rb
|
40
50
|
- sample/ssl/0cert.pem
|
41
51
|
- sample/ssl/0key.pem
|
42
|
-
- sample/ssl/ssl_client.rb
|
43
52
|
- sample/ssl/1000cert.pem
|
53
|
+
- sample/ssl/1000key.pem
|
44
54
|
- sample/ssl/htdocs/index.html
|
55
|
+
- sample/ssl/ssl_client.rb
|
45
56
|
- sample/ssl/webrick_httpsd.rb
|
46
|
-
- sample/ssl/1000key.pem
|
47
|
-
- sample/oauth_twitter.rb
|
48
|
-
- sample/thread.rb
|
49
|
-
- sample/dav.rb
|
50
|
-
- sample/oauth_friendfeed.rb
|
51
57
|
- sample/stream.rb
|
52
|
-
- sample/
|
53
|
-
- sample/oauth_buzz.rb
|
58
|
+
- sample/thread.rb
|
54
59
|
- sample/wcat.rb
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
- test/test_ssl.rb
|
59
|
-
- test/htdigest
|
60
|
-
- test/server.key
|
61
|
-
- test/client.key
|
60
|
+
- test/ca-chain.cert
|
61
|
+
- test/ca.cert
|
62
|
+
- test/client-pass.key
|
62
63
|
- test/client.cert
|
64
|
+
- test/client.key
|
65
|
+
- test/helper.rb
|
66
|
+
- test/htdigest
|
63
67
|
- test/htpasswd
|
64
|
-
- test/
|
65
|
-
- test/
|
66
|
-
- test/
|
67
|
-
- test/
|
68
|
+
- test/reports/TEST-HTTPAccess2-TestClient.xml
|
69
|
+
- test/reports/TEST-TestCookie.xml
|
70
|
+
- test/reports/TEST-TestCookieManager.xml
|
71
|
+
- test/reports/TEST-TestHTTPClient.xml
|
72
|
+
- test/reports/TEST-TestSSL.0.xml
|
73
|
+
- test/reports/TEST-TestSSL.1.xml
|
74
|
+
- test/reports/TEST-TestSSL.xml
|
68
75
|
- test/runner.rb
|
69
76
|
- test/server.cert
|
70
|
-
- test/
|
77
|
+
- test/server.key
|
78
|
+
- test/sslsvr.rb
|
79
|
+
- test/subca.cert
|
71
80
|
- test/test_auth.rb
|
72
|
-
- test/
|
73
|
-
- test/helper.rb
|
81
|
+
- test/test_cookie.rb
|
74
82
|
- test/test_hexdump.rb
|
83
|
+
- test/test_http-access2.rb
|
84
|
+
- test/test_httpclient.rb
|
75
85
|
- test/test_include_client.rb
|
76
|
-
- test/
|
77
|
-
- README.txt
|
86
|
+
- test/test_ssl.rb
|
78
87
|
homepage: http://github.com/nahi/httpclient
|
79
|
-
licenses:
|
88
|
+
licenses:
|
89
|
+
- ruby
|
90
|
+
metadata: {}
|
80
91
|
post_install_message:
|
81
92
|
rdoc_options: []
|
82
93
|
require_paths:
|
83
94
|
- lib
|
84
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
96
|
requirements:
|
87
|
-
- -
|
97
|
+
- - ">="
|
88
98
|
- !ruby/object:Gem::Version
|
89
99
|
version: '0'
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
hash: -1409690202161290935
|
93
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
101
|
requirements:
|
96
|
-
- -
|
102
|
+
- - ">="
|
97
103
|
- !ruby/object:Gem::Version
|
98
104
|
version: '0'
|
99
|
-
segments:
|
100
|
-
- 0
|
101
|
-
hash: -1409690202161290935
|
102
105
|
requirements: []
|
103
106
|
rubyforge_project:
|
104
|
-
rubygems_version:
|
107
|
+
rubygems_version: 2.2.2
|
105
108
|
signing_key:
|
106
|
-
specification_version:
|
109
|
+
specification_version: 4
|
107
110
|
summary: gives something like the functionality of libwww-perl (LWP) in Ruby
|
108
111
|
test_files: []
|