Skip to content

Commit

Permalink
Merge pull request taf2#255 from mkauf/master
Browse files Browse the repository at this point in the history
Fix a bug introduced by commits 4358d04 and 14e9b53
  • Loading branch information
taf2 committed Aug 15, 2015
2 parents 670030a + 8afd5fe commit b085859
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ext/curb_easy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3125,13 +3125,6 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
case CURLOPT_NOPROGRESS:
case CURLOPT_NOSIGNAL:
case CURLOPT_HTTPGET:
break;
case CURLOPT_POST: {
curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE);
} break;
case CURLOPT_POSTFIELDS: {
curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val));
} break;
case CURLOPT_NOBODY: {
int type = rb_type(val);
VALUE value;
Expand All @@ -3144,6 +3137,12 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
}
curl_easy_setopt(rbce->curl, option, FIX2INT(value));
} break;
case CURLOPT_POST: {
curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE);
} break;
case CURLOPT_POSTFIELDS: {
curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val));
} break;
case CURLOPT_USERPWD: {
VALUE userpwd = val;
CURB_OBJECT_HSETTER(ruby_curl_easy, userpwd);
Expand Down

0 comments on commit b085859

Please sign in to comment.