httpclient 2.6.0.1 → 2.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 818edfb3917bbbadefec0016e2dbfd5e9913d54d
4
- data.tar.gz: 260374c907fe2bba906b5fa224f026b75c8adef5
3
+ metadata.gz: 45217dcc777d36d71246dd468e40b79caad351d6
4
+ data.tar.gz: afcf1a175414e0a1dde95eb5823b0fa339655d9c
5
5
  SHA512:
6
- metadata.gz: 482690ad44dbd31cf5bb1e328fc53478f574365fad8b40fbdc32107665c41a416be53dab69a85ee28cd97c0fe2952fb5fb2b82943a542b7a53ff387f8120966e
7
- data.tar.gz: 6e011eca6183b328b0997e6d8be1272a4bb2c083fde4de78c274af6ed2595936f49ba9b75f37924cf94cced4a73504c189a5e7f8a6254e95e5422abe23f25d19
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-2014 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
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::SSLSocketWrap
42
+ SSLSocketWrap = ::HTTPClient::SSLSocket
43
43
  DebugSocket = ::HTTPClient::DebugSocket
44
44
 
45
45
  class Session < ::HTTPClient::Session
@@ -1,5 +1,5 @@
1
1
  # HTTPClient - HTTP client library.
2
- # Copyright (C) 2000-2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
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 unless @challenge['challenged']
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
- domain_uri, param = @challenge.find { |uri, v|
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