Changeset 74091 in vbox
- Timestamp:
- Sep 5, 2018 5:58:31 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/http.h
r74090 r74091 464 464 * call this method for different status codes. Only the last one 465 465 * with be honored. 466 * 467 * @note This only works reliably with RTHttpPerform at the moment. 466 468 */ 467 469 RTR3DECL(int) RTHttpSetDownloadCallback(RTHTTP hHttp, uint32_t fFlags, PFNRTHTTPDOWNLOADCALLBACK pfnCallback, void *pvUser); … … 501 503 * @param pfnCallback The callback function. Pass NULL to reset the callback. 502 504 * @param pvUser Convenience pointer for the callback function. 505 * 506 * @note This only works reliably with RTHttpPerform at the moment. 503 507 */ 504 508 RTR3DECL(int) RTHttpSetUploadCallback(RTHTTP hHttp, uint64_t cbContent, PFNRTHTTPUPLOADCALLBACK pfnCallback, void *pvUser); … … 528 532 * @param pfnCallback The callback function. Pass NULL to reset the callback. 529 533 * @param pvUser Convenience pointer for the callback function. 534 * 535 * @note This only works reliably with RTHttpPerform at the moment. 530 536 */ 531 537 RTR3DECL(int) RTHttpSetHeaderCallback(RTHTTP hHttp, PFNRTHTTPHEADERCALLBACK pfnCallback, void *pvUser); -
trunk/src/VBox/Runtime/generic/http-curl.cpp
r74090 r74091 2859 2859 2860 2860 2861 /** 2862 * Tries to determin uDownloadHttpStatus and cbDownloadContent. 2863 * 2864 * @param pThis HTTP client instance. 2865 */ 2861 2866 static void rtHttpGetDownloadStatusAndLength(PRTHTTPINTERNAL pThis) 2862 2867 { … … 2865 2870 pThis->uDownloadHttpStatus = (uint32_t)lHttpStatus; 2866 2871 2872 #ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 2867 2873 curl_off_t cbContent = -1; 2868 2874 curl_easy_getinfo(pThis->pCurl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cbContent); 2869 2875 if (cbContent >= 0) 2870 2876 pThis->cbDownloadContent = (uint64_t)cbContent; 2877 #else 2878 double rdContent = -1.0; 2879 curl_easy_getinfo(pThis->pCurl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &rdContent); 2880 if (rdContent >= 0.0) 2881 pThis->cbDownloadContent = (uint64_t)rdContent; 2882 #endif 2871 2883 } 2872 2884
Note:
See TracChangeset
for help on using the changeset viewer.