typhoeus 0.1.25 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.25
1
+ 0.1.26
@@ -24,7 +24,8 @@ module Typhoeus
24
24
  :CURLOPT_VERBOSE => 41,
25
25
  :CURLOPT_PROXY => 10004,
26
26
  :CURLOPT_VERIFYPEER => 64,
27
- :CURLOPT_NOBODY => 44
27
+ :CURLOPT_NOBODY => 44,
28
+ :CURLOPT_ENCODING => 102
28
29
  }
29
30
  INFO_VALUES = {
30
31
  :CURLINFO_RESPONSE_CODE => 2097154,
@@ -44,6 +45,8 @@ module Typhoeus
44
45
  @method = :get
45
46
  @post_dat_set = nil
46
47
  @headers = {}
48
+
49
+ set_option(OPTION_VALUES[:CURLOPT_ENCODING], 'zlib') if supports_zlib?
47
50
  end
48
51
 
49
52
  def headers=(hash)
@@ -132,18 +132,10 @@ module Typhoeus
132
132
  @running_requests += 1
133
133
 
134
134
  easy = @easy_pool.pop || Easy.new
135
-
136
- # Force gzip if we support it.
137
- headers = {}
138
- if easy.supports_zlib?
139
- headers['Accept-Encoding'] = 'gzip'
140
- end
141
- headers.merge!(request.headers) if request.headers
142
-
143
135
  easy.url = request.url
144
136
  easy.method = request.method
145
137
  easy.params = request.params if request.method == :post && !request.params.nil?
146
- easy.headers = headers
138
+ easy.headers = request.headers if request.headers
147
139
  easy.request_body = request.body if request.body
148
140
  easy.timeout = request.timeout if request.timeout
149
141
  easy.follow_location = request.follow_location if request.follow_location
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{typhoeus}
8
- s.version = "0.1.25"
8
+ s.version = "0.1.26"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Dix"]
12
- s.date = %q{2010-05-13}
12
+ s.date = %q{2010-05-15}
13
13
  s.description = %q{Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.}
14
14
  s.email = %q{paul@pauldix.net}
15
15
  s.extensions = ["ext/typhoeus/extconf.rb"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 25
9
- version: 0.1.25
8
+ - 26
9
+ version: 0.1.26
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Dix
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-13 00:00:00 -07:00
17
+ date: 2010-05-15 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20