curb 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of curb might be problematic. Click here for more details.
- data/ext/curb.h +3 -3
- data/ext/curb_config.h +1 -0
- data/ext/curb_multi.c +24 -2
- data/ext/extconf.rb +1 -0
- metadata +2 -2
data/ext/curb.h
CHANGED
@@ -20,11 +20,11 @@
|
|
20
20
|
#include "curb_macros.h"
|
21
21
|
|
22
22
|
// These should be managed from the Rake 'release' task.
|
23
|
-
#define CURB_VERSION "0.3.
|
24
|
-
#define CURB_VER_NUM
|
23
|
+
#define CURB_VERSION "0.3.4"
|
24
|
+
#define CURB_VER_NUM 340
|
25
25
|
#define CURB_VER_MAJ 0
|
26
26
|
#define CURB_VER_MIN 3
|
27
|
-
#define CURB_VER_MIC
|
27
|
+
#define CURB_VER_MIC 4
|
28
28
|
#define CURB_VER_PATCH 0
|
29
29
|
|
30
30
|
|
data/ext/curb_config.h
CHANGED
data/ext/curb_multi.c
CHANGED
@@ -94,7 +94,28 @@ static VALUE ruby_curl_multi_max_connects(VALUE self, VALUE count) {
|
|
94
94
|
curl_multi_setopt(rbcm->handle, CURLMOPT_MAXCONNECTS, NUM2INT(count));
|
95
95
|
#endif
|
96
96
|
|
97
|
-
return
|
97
|
+
return count;
|
98
|
+
}
|
99
|
+
|
100
|
+
/*
|
101
|
+
* call-seq:
|
102
|
+
* multi = Curl::Multi.new
|
103
|
+
* multi.pipeline = true
|
104
|
+
*
|
105
|
+
* Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi handle will make it
|
106
|
+
* attempt to perform HTTP Pipelining as far as possible for transfers using this handle. This means
|
107
|
+
* that if you add a second request that can use an already existing connection, the second request will
|
108
|
+
* be "piped" on the same connection rather than being executed in parallel. (Added in 7.16.0)
|
109
|
+
*
|
110
|
+
*/
|
111
|
+
static VALUE ruby_curl_multi_pipeline(VALUE self, VALUE onoff) {
|
112
|
+
#ifdef HAVE_CURLMOPT_PIPELINING
|
113
|
+
ruby_curl_multi *rbcm;
|
114
|
+
|
115
|
+
Data_Get_Struct(self, ruby_curl_multi, rbcm);
|
116
|
+
curl_multi_setopt(rbcm->handle, CURLMOPT_PIPELINING, onoff == Qtrue ? 1 : 0);
|
117
|
+
#endif
|
118
|
+
return onoff;
|
98
119
|
}
|
99
120
|
|
100
121
|
/*
|
@@ -214,7 +235,7 @@ static void rb_curl_multi_read_info(VALUE self, CURLM *multi_handle) {
|
|
214
235
|
ruby_curl_multi_remove( self, rbce->self );
|
215
236
|
|
216
237
|
if (rbce->complete_proc != Qnil) {
|
217
|
-
rb_funcall( rbce->complete_proc, idCall, 1, self );
|
238
|
+
rb_funcall( rbce->complete_proc, idCall, 1, rbce->self );
|
218
239
|
}
|
219
240
|
|
220
241
|
long response_code = -1;
|
@@ -349,6 +370,7 @@ void init_curb_multi() {
|
|
349
370
|
|
350
371
|
/* Instnace methods */
|
351
372
|
rb_define_method(cCurlMulti, "max_connects=", ruby_curl_multi_max_connects, 1);
|
373
|
+
rb_define_method(cCurlMulti, "pipeline=", ruby_curl_multi_pipeline, 1);
|
352
374
|
rb_define_method(cCurlMulti, "add", ruby_curl_multi_add, 1);
|
353
375
|
rb_define_method(cCurlMulti, "remove", ruby_curl_multi_remove, 1);
|
354
376
|
rb_define_method(cCurlMulti, "perform", ruby_curl_multi_perform, 0);
|
data/ext/extconf.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Bamford
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-04-
|
13
|
+
date: 2009-04-27 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|