patron 0.4.12 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/ext/patron/extconf.rb +0 -4
- data/ext/patron/session_ext.c +5 -0
- data/lib/patron/request.rb +1 -1
- data/lib/patron/session.rb +4 -0
- data/lib/patron/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/ext/patron/extconf.rb
CHANGED
@@ -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
|
|
data/ext/patron/session_ext.c
CHANGED
@@ -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);
|
data/lib/patron/request.rb
CHANGED
@@ -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
|
|
data/lib/patron/session.rb
CHANGED
@@ -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
|
data/lib/patron/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: patron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
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-
|
13
|
+
date: 2011-07-21 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|