Lines Matching defs:pHttpInt

111     PRTHTTPINTERNAL pHttpInt = (PRTHTTPINTERNAL)RTMemAllocZ(sizeof(RTHTTPINTERNAL));
112 if (!pHttpInt)
115 pHttpInt->u32Magic = RTHTTP_MAGIC;
116 pHttpInt->pCurl = pCurl;
118 *phHttp = (RTHTTP)pHttpInt;
128 PRTHTTPINTERNAL pHttpInt = hHttp;
129 RTHTTP_VALID_RETURN_VOID(pHttpInt);
131 pHttpInt->u32Magic = RTHTTP_MAGIC_DEAD;
133 curl_easy_cleanup(pHttpInt->pCurl);
135 if (pHttpInt->pHeaders)
136 curl_slist_free_all(pHttpInt->pHeaders);
138 if (pHttpInt->pcszCAFile)
139 RTStrFree(pHttpInt->pcszCAFile);
141 if (pHttpInt->pszRedirLocation)
142 RTStrFree(pHttpInt->pszRedirLocation);
144 RTMemFree(pHttpInt);
167 PRTHTTPINTERNAL pHttpInt = (PRTHTTPINTERNAL)pData;
168 AssertReturn(pHttpInt->u32Magic == RTHTTP_MAGIC, 1);
170 return pHttpInt->fAbort ? 1 : 0;
175 PRTHTTPINTERNAL pHttpInt = hHttp;
176 RTHTTP_VALID_RETURN(pHttpInt);
178 pHttpInt->fAbort = true;
185 PRTHTTPINTERNAL pHttpInt = hHttp;
186 RTHTTP_VALID_RETURN(pHttpInt);
188 if (!pHttpInt->pszRedirLocation)
191 *ppszRedirLocation = RTStrDup(pHttpInt->pszRedirLocation);
197 PRTHTTPINTERNAL pHttpInt = hHttp;
198 RTHTTP_VALID_RETURN(pHttpInt);
210 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXY, &szProxy[sizeof("http://") - 1]);
213 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYPORT, 80);
219 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXY, &szProxy[sizeof("http://") - 1]);
233 PRTHTTPINTERNAL pHttpInt = hHttp;
234 RTHTTP_VALID_RETURN(pHttpInt);
237 int rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXY, pcszProxy);
243 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYPORT, (long)uPort);
250 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYUSERNAME, pcszProxyUser);
254 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYPASSWORD, pcszProxyPwd);
264 PRTHTTPINTERNAL pHttpInt = hHttp;
265 RTHTTP_VALID_RETURN(pHttpInt);
269 if (pHttpInt->pHeaders)
270 curl_slist_free_all(pHttpInt->pHeaders);
271 pHttpInt->pHeaders = 0;
279 pHttpInt->pHeaders = pHeaders;
280 int rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_HTTPHEADER, pHeaders);
348 PRTHTTPINTERNAL pHttpInt = hHttp;
349 RTHTTP_VALID_RETURN(pHttpInt);
351 if (pHttpInt->pcszCAFile)
352 RTStrFree(pHttpInt->pcszCAFile);
353 pHttpInt->pcszCAFile = RTStrDup(pcszCAFile);
354 if (!pHttpInt->pcszCAFile)
365 * @param pHttpInt HTTP instance.
368 static int rtHttpGetCalcStatus(PRTHTTPINTERNAL pHttpInt, int rcCurl)
372 if (pHttpInt->pszRedirLocation)
374 RTStrFree(pHttpInt->pszRedirLocation);
375 pHttpInt->pszRedirLocation = NULL;
379 curl_easy_getinfo(pHttpInt->pCurl, CURLINFO_RESPONSE_CODE, &pHttpInt->lLastResp);
380 switch (pHttpInt->lLastResp)
391 curl_easy_getinfo(pHttpInt->pCurl, CURLINFO_REDIRECT_URL, &pszRedirect);
394 pHttpInt->pszRedirLocation = RTStrDup(pszRedirect);
449 PRTHTTPINTERNAL pHttpInt = hHttp;
450 RTHTTP_VALID_RETURN(pHttpInt);
452 pHttpInt->fAbort = false;
454 int rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_URL, pcszUrl);
459 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_VERBOSE, 1);
465 if (pHttpInt->pcszCAFile)
466 pcszCAFile = pHttpInt->pcszCAFile;
469 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_CAINFO, pcszCAFile);
475 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_WRITEFUNCTION, &rtHttpWriteData);
478 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_WRITEDATA, (void*)&chunk);
481 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROGRESSFUNCTION, &rtHttpProgress);
484 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROGRESSDATA, (void*)pHttpInt);
487 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_NOPROGRESS, (long)0);
490 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1);
494 rcCurl = curl_easy_perform(pHttpInt->pCurl);
495 int rc = rtHttpGetCalcStatus(pHttpInt, rcCurl);
534 PRTHTTPINTERNAL pHttpInt = hHttp;
535 RTHTTP_VALID_RETURN(pHttpInt);
540 pHttpInt->fAbort = false;
542 int rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_URL, pszUrl);
547 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_VERBOSE, 1);
553 if (pHttpInt->pcszCAFile)
554 pcszCAFile = pHttpInt->pcszCAFile;
557 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_CAINFO, pcszCAFile);
562 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_WRITEFUNCTION, &rtHttpWriteDataToFile);
565 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROGRESSFUNCTION, &rtHttpProgress);
568 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROGRESSDATA, (void*)pHttpInt);
571 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_NOPROGRESS, (long)0);
582 rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_WRITEDATA, (void *)(uintptr_t)hFile);
588 rcCurl = curl_easy_perform(pHttpInt->pCurl);
589 rc = rtHttpGetCalcStatus(pHttpInt, rcCurl);