patron 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- patron (0.4.12)
4
+ patron (0.4.13)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -22,10 +22,6 @@
22
22
  ##
23
23
  ## -------------------------------------------------------------------
24
24
 
25
- if RUBY_PLATFORM =~ /darwin10\.0/
26
- ENV['ARCHFLAGS'] = '-force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64'
27
- end
28
-
29
25
  require 'mkmf'
30
26
  require 'rbconfig'
31
27
 
@@ -332,6 +332,11 @@ static void set_options_from_request(VALUE self, VALUE request) {
332
332
  curl_easy_setopt(curl, CURLOPT_USERPWD, StringValuePtr(credentials));
333
333
  }
334
334
 
335
+ VALUE ignore_content_length = rb_iv_get(request, "@ignore_content_length");
336
+ if (!NIL_P(ignore_content_length)) {
337
+ curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1);
338
+ }
339
+
335
340
  VALUE insecure = rb_iv_get(request, "@insecure");
336
341
  if(!NIL_P(insecure)) {
337
342
  curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
@@ -42,7 +42,7 @@ module Patron
42
42
  @max_redirects = -1
43
43
  end
44
44
 
45
- attr_accessor :url, :username, :password, :file_name, :proxy, :proxy_type, :auth_type, :insecure, :multipart
45
+ attr_accessor :url, :username, :password, :file_name, :proxy, :proxy_type, :auth_type, :insecure, :ignore_content_size, :multipart
46
46
  attr_reader :action, :timeout, :connect_timeout, :max_redirects, :headers, :buffer_size
47
47
  attr_reader :auth_type
48
48
 
@@ -68,6 +68,9 @@ module Patron
68
68
  # Does this session stricly verify SSL certificates?
69
69
  attr_accessor :insecure
70
70
 
71
+ # Does this session ignore Content-Size headers?
72
+ attr_accessor :ignore_content_size
73
+
71
74
  # Set the buffer size for this request. This option will
72
75
  # only be set if buffer_size is non-nil
73
76
  attr_accessor :buffer_size
@@ -196,6 +199,7 @@ module Patron
196
199
  req.proxy_type = proxy_type
197
200
  req.auth_type = auth_type
198
201
  req.insecure = insecure
202
+ req.ignore_content_size = ignore_content_size
199
203
  req.buffer_size = buffer_size
200
204
 
201
205
  url = self.base_url.to_s + url.to_s
@@ -1,3 +1,3 @@
1
1
  module Patron
2
- VERSION = "0.4.12"
2
+ VERSION = "0.4.13"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: patron
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.12
5
+ version: 0.4.13
6
6
  platform: ruby
7
7
  authors:
8
8
  - Phillip Toland
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-22 00:00:00 -05:00
13
+ date: 2011-07-21 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency