httpclient 2.6.0.1 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/httpclient +7 -1
- data/lib/http-access2.rb +1 -1
- data/lib/httpclient/auth.rb +3 -3
- data/lib/httpclient/cacert.pem +3952 -0
- data/lib/httpclient/connection.rb +1 -1
- data/lib/httpclient/cookie.rb +10 -10
- data/lib/httpclient/http.rb +9 -4
- data/lib/httpclient/jruby_ssl_socket.rb +588 -0
- data/lib/httpclient/session.rb +199 -262
- data/lib/httpclient/ssl_config.rb +123 -114
- data/lib/httpclient/ssl_socket.rb +150 -0
- data/lib/httpclient/timeout.rb +1 -1
- data/lib/httpclient/util.rb +33 -1
- data/lib/httpclient/version.rb +1 -1
- data/lib/httpclient/webagent-cookie.rb +2 -2
- data/lib/httpclient.rb +72 -20
- data/lib/oauthclient.rb +2 -1
- data/test/helper.rb +7 -5
- data/test/jruby_ssl_socket/test_pemutils.rb +32 -0
- data/test/test_auth.rb +28 -9
- data/test/test_cookie.rb +2 -2
- data/test/test_http-access2.rb +2 -0
- data/test/test_httpclient.rb +143 -23
- data/test/test_ssl.rb +295 -17
- data/test/test_webagent-cookie.rb +2 -2
- metadata +14 -10
- /data/lib/httpclient/{cacert.p7s → cacert1024.pem} +0 -0
- /data/test/{ca-chain.cert → ca-chain.pem} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45217dcc777d36d71246dd468e40b79caad351d6
|
4
|
+
data.tar.gz: afcf1a175414e0a1dde95eb5823b0fa339655d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5ae105eb3b269d67521a35446e3518b359e7a359c0c8a14500ef9e9ff8c4681c20b103bb4d5a2f96cdd9caa337fc149f39df3754bb9f3185b6914f284adfdc0
|
7
|
+
data.tar.gz: 005d1769b6906e0c107ba63e7a178c4d73aae59198ed3efe866e8722fdadcf4c4142c3724c167b6db5f8a45cb03f517083164c18fdd1aa65074dc4ab362bc9de
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
httpclient - HTTP accessing library. [![Gem Version](https://badge.fury.io/rb/httpclient.svg)](http://badge.fury.io/rb/httpclient)
|
2
2
|
|
3
|
-
Copyright (C) 2000-
|
3
|
+
Copyright (C) 2000-2015 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
4
|
|
5
5
|
'httpclient' gives something like the functionality of libwww-perl (LWP) in
|
6
6
|
Ruby. 'httpclient' formerly known as 'http-access2'.
|
data/bin/httpclient
CHANGED
@@ -11,11 +11,16 @@
|
|
11
11
|
# > get "https://www.google.co.jp/", :q => :ruby
|
12
12
|
require 'httpclient'
|
13
13
|
|
14
|
-
METHODS = ['head', 'get', 'post', 'put', 'delete', 'options', 'propfind', 'proppatch', 'trace']
|
15
14
|
method = ARGV.shift
|
15
|
+
if method == 'version'
|
16
|
+
puts HTTPClient::VERSION
|
17
|
+
exit
|
18
|
+
end
|
19
|
+
|
16
20
|
url = ARGV.shift
|
17
21
|
if method && url
|
18
22
|
client = HTTPClient.new
|
23
|
+
client.strict_response_size_check = true
|
19
24
|
if method == 'download'
|
20
25
|
print client.get_content(url)
|
21
26
|
else
|
@@ -33,6 +38,7 @@ require 'irb/completion'
|
|
33
38
|
class Runner
|
34
39
|
def initialize
|
35
40
|
@httpclient = HTTPClient.new
|
41
|
+
@httpclient.strict_response_size_check = true
|
36
42
|
end
|
37
43
|
|
38
44
|
def method_missing(msg, *a, &b)
|
data/lib/http-access2.rb
CHANGED
@@ -39,7 +39,7 @@ module HTTPAccess2
|
|
39
39
|
Site = ::HTTPClient::Site
|
40
40
|
Connection = ::HTTPClient::Connection
|
41
41
|
SessionManager = ::HTTPClient::SessionManager
|
42
|
-
SSLSocketWrap = ::HTTPClient::
|
42
|
+
SSLSocketWrap = ::HTTPClient::SSLSocket
|
43
43
|
DebugSocket = ::HTTPClient::DebugSocket
|
44
44
|
|
45
45
|
class Session < ::HTTPClient::Session
|
data/lib/httpclient/auth.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# HTTPClient - HTTP client library.
|
2
|
-
# Copyright (C) 2000-
|
2
|
+
# Copyright (C) 2000-2015 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
3
3
|
#
|
4
4
|
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
5
5
|
# redistribute it and/or modify it under the same terms of Ruby's license;
|
@@ -312,7 +312,7 @@ class HTTPClient
|
|
312
312
|
|
313
313
|
def get(req)
|
314
314
|
synchronize {
|
315
|
-
return nil
|
315
|
+
return nil if !@force_auth and !@challenge['challenged']
|
316
316
|
@cred
|
317
317
|
}
|
318
318
|
end
|
@@ -535,7 +535,7 @@ class HTTPClient
|
|
535
535
|
def get(req)
|
536
536
|
target_uri = req.header.request_uri
|
537
537
|
synchronize {
|
538
|
-
|
538
|
+
_domain_uri, param = @challenge.find { |uri, v|
|
539
539
|
Util.uri_part_of(target_uri, uri)
|
540
540
|
}
|
541
541
|
return nil unless param
|