patron 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/ext/patron/session_ext.c +5 -5
- metadata +4 -4
data/VERSION.yml
CHANGED
data/ext/patron/session_ext.c
CHANGED
@@ -144,19 +144,19 @@ VALUE session_unescape(VALUE self, VALUE value) {
|
|
144
144
|
}
|
145
145
|
|
146
146
|
// Callback used to iterate over the HTTP headers and store them in an slist.
|
147
|
-
static
|
147
|
+
static int each_http_header(VALUE header_key, VALUE header_value, VALUE self) {
|
148
148
|
struct curl_state *state;
|
149
149
|
Data_Get_Struct(self, struct curl_state, state);
|
150
150
|
|
151
|
-
VALUE name = rb_obj_as_string(
|
152
|
-
VALUE value = rb_obj_as_string(
|
151
|
+
VALUE name = rb_obj_as_string(header_key);
|
152
|
+
VALUE value = rb_obj_as_string(header_value);
|
153
153
|
|
154
154
|
VALUE header_str = Qnil;
|
155
155
|
header_str = rb_str_plus(name, rb_str_new2(": "));
|
156
156
|
header_str = rb_str_plus(header_str, value);
|
157
157
|
|
158
158
|
state->headers = curl_slist_append(state->headers, StringValuePtr(header_str));
|
159
|
-
return
|
159
|
+
return 0;
|
160
160
|
}
|
161
161
|
|
162
162
|
static void set_chunked_encoding(struct curl_state *state) {
|
@@ -187,7 +187,7 @@ static void set_options_from_request(VALUE self, VALUE request) {
|
|
187
187
|
rb_raise(rb_eArgError, "Headers must be passed in a hash.");
|
188
188
|
}
|
189
189
|
|
190
|
-
|
190
|
+
rb_hash_foreach(headers, each_http_header, self);
|
191
191
|
}
|
192
192
|
|
193
193
|
ID action = SYM2ID(rb_iv_get(request, "@action"));
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 9
|
10
|
+
version: 0.4.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Phillip Toland
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-14 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|