mechanize 0.8.3 → 0.8.4
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.
Potentially problematic release.
This version of mechanize might be problematic. Click here for more details.
- data/History.txt +6 -0
- data/lib/www/mechanize.rb +1 -1
- data/lib/www/mechanize/chain/auth_headers.rb +7 -6
- data/lib/www/mechanize/chain/header_resolver.rb +2 -1
- data/mechanize.gemspec +2 -2
- metadata +2 -2
data/History.txt
CHANGED
data/lib/www/mechanize.rb
CHANGED
@@ -24,11 +24,11 @@ module WWW
|
|
24
24
|
request.basic_auth(@user, @password)
|
25
25
|
when :iis_digest
|
26
26
|
digest_response = self.gen_auth_header(uri,request, @digest, true)
|
27
|
-
request
|
27
|
+
request['Authorization'] = digest_response
|
28
28
|
when :digest
|
29
29
|
if @digest
|
30
30
|
digest_response = self.gen_auth_header(uri,request, @digest)
|
31
|
-
request
|
31
|
+
request['Authorization'] = digest_response
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -57,16 +57,17 @@ module WWW
|
|
57
57
|
|
58
58
|
header = ''
|
59
59
|
header << "Digest username=\"#{@user}\", "
|
60
|
-
header << "realm=\"#{params['realm']}\", "
|
61
60
|
if is_IIS then
|
62
61
|
header << "qop=\"#{params['qop']}\", "
|
63
62
|
else
|
64
63
|
header << "qop=#{params['qop']}, "
|
65
64
|
end
|
66
65
|
header << "uri=\"#{uri.path}\", "
|
67
|
-
header <<
|
68
|
-
|
69
|
-
|
66
|
+
header << %w{ algorithm opaque nonce realm }.map { |field|
|
67
|
+
next unless params[field]
|
68
|
+
"#{field}=\"#{params[field]}\""
|
69
|
+
}.compact.join(', ')
|
70
|
+
|
70
71
|
header << "nc=#{'%08x' % @@nonce_count}, "
|
71
72
|
header << "cnonce=\"#{CNONCE}\", "
|
72
73
|
header << "response=\"#{Digest::MD5.hexdigest(request_digest)}\""
|
@@ -23,7 +23,8 @@ module WWW
|
|
23
23
|
end
|
24
24
|
request['Accept-Encoding'] = 'gzip,identity'
|
25
25
|
request['Accept-Language'] = 'en-us,en;q=0.5'
|
26
|
-
|
26
|
+
host = "#{uri.host}#{uri.port.to_i == 80 ? '' : ':' + uri.port.to_s}"
|
27
|
+
request['Host'] = host
|
27
28
|
request['Accept-Charset'] = 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
|
28
29
|
|
29
30
|
unless @cookie_jar.empty?(uri)
|
data/mechanize.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{mechanize}
|
3
|
-
s.version = "0.8.
|
3
|
+
s.version = "0.8.3.20081002222419"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Aaron Patterson"]
|
7
|
-
s.date = %q{2008-
|
7
|
+
s.date = %q{2008-10-02}
|
8
8
|
s.description = %q{The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.}
|
9
9
|
s.email = %q{aaronp@rubyforge.org}
|
10
10
|
s.extra_rdoc_files = ["EXAMPLES.txt", "FAQ.txt", "GUIDE.txt", "History.txt", "LICENSE.txt", "Manifest.txt", "NOTES.txt", "README.txt"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mechanize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-02 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|