Skip to content

Commit

Permalink
CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA is only supported by curl-7…
Browse files Browse the repository at this point in the history
….17 later
  • Loading branch information
hsbt committed Jul 29, 2014
1 parent e46bebd commit 62caec9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/curb_easy.c
Expand Up @@ -791,9 +791,13 @@ static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {
curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, (curl_read_callback)read_data_handler);
#if HAVE_CURLOPT_SEEKFUNCTION
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, (curl_seek_callback)seek_data_handler);
#endif
curl_easy_setopt(curl, CURLOPT_READDATA, rbce);
#if HAVE_CURLOPT_SEEKDATA
curl_easy_setopt(curl, CURLOPT_SEEKDATA, rbce);
#endif

/*
* we need to set specific headers for the PUT to work... so
Expand Down

0 comments on commit 62caec9

Please sign in to comment.