209 if(ret == CURLE_OK) { |
209 if(ret == CURLE_OK) { |
210 if(sn->logfunc) { |
210 if(sn->logfunc) { |
211 char *log_method; |
211 char *log_method; |
212 char *log_url; |
212 char *log_url; |
213 curl_easy_getinfo(sn->handle, CURLINFO_EFFECTIVE_URL, &log_url); |
213 curl_easy_getinfo(sn->handle, CURLINFO_EFFECTIVE_URL, &log_url); |
|
214 #if LIBCURL_VERSION_NUM >= 0x074800 |
214 curl_easy_getinfo(sn->handle, CURLINFO_EFFECTIVE_METHOD , &log_method); |
215 curl_easy_getinfo(sn->handle, CURLINFO_EFFECTIVE_METHOD , &log_method); |
|
216 #else |
|
217 long opt_upload = 0; |
|
218 curl_easy_getinfo(sn->handle, CURLOPT_UPLOAD, &opt_upload); |
|
219 char *opt_custom = NULL; |
|
220 curl_easy_getinfo(sn->handle, CURLOPT_CUSTOMREQUEST, &opt_custom); |
|
221 if(opt_custom) { |
|
222 log_method = opt_custom; |
|
223 } else if(opt_upload) { |
|
224 log_method = "PUT"; |
|
225 } else { |
|
226 log_method = "GET"; |
|
227 } |
|
228 #endif |
215 char *log_reqbody = NULL; |
229 char *log_reqbody = NULL; |
216 size_t log_reqbodylen = 0; |
230 size_t log_reqbodylen = 0; |
217 char *log_rpbody = NULL; |
231 char *log_rpbody = NULL; |
218 size_t log_rpbodylen = 0; |
232 size_t log_rpbodylen = 0; |
219 if(request) { |
233 if(request) { |