66 CURLcode ret = 0; |
66 CURLcode ret = 0; |
67 |
67 |
68 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
68 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
69 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
69 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
70 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
70 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
71 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
71 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
|
72 curl_easy_setopt(handle, CURLOPT_SEEKDATA, request); |
72 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
73 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
73 |
74 |
74 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
75 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
75 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
76 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
76 CxMap *respheaders = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 32); |
77 CxMap *respheaders = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 32); |
807 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); |
808 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); |
808 |
809 |
809 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
810 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
810 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
811 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
811 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
812 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
812 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
813 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
|
814 curl_easy_setopt(handle, CURLOPT_SEEKDATA, request); |
813 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
815 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
814 |
816 |
815 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
817 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
816 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
818 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
817 |
819 |
1039 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); |
1041 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); |
1040 } |
1042 } |
1041 |
1043 |
1042 curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_func); |
1044 curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_func); |
1043 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, seek_func); |
1045 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, seek_func); |
|
1046 curl_easy_setopt(handle, CURLOPT_SEEKDATA, data); |
1044 curl_easy_setopt(handle, CURLOPT_READDATA, data); |
1047 curl_easy_setopt(handle, CURLOPT_READDATA, data); |
1045 |
1048 |
1046 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write); |
1049 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write); |
1047 curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL); |
1050 curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL); |
1048 |
1051 |
1270 |
1273 |
1271 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
1274 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
1272 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
1275 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
1273 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
1276 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
1274 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
1277 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
|
1278 curl_easy_setopt(handle, CURLOPT_SEEKDATA, request); |
1275 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
1279 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
1276 |
1280 |
1277 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
1281 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
1278 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
1282 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
1279 |
1283 |
1338 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "REPORT"); |
1342 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "REPORT"); |
1339 |
1343 |
1340 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
1344 curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); |
1341 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
1345 curl_easy_setopt(handle, CURLOPT_READFUNCTION, cxBufferRead); |
1342 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
1346 curl_easy_setopt(handle, CURLOPT_SEEKFUNCTION, cxBufferSeek); |
1343 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
1347 curl_easy_setopt(handle, CURLOPT_READDATA, request); |
|
1348 curl_easy_setopt(handle, CURLOPT_SEEKDATA, request); |
1344 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
1349 curl_easy_setopt(handle, CURLOPT_INFILESIZE, request->size); |
1345 |
1350 |
1346 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
1351 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, cxBufferWrite); |
1347 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
1352 curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); |
1348 |
1353 |