mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Whoops I used the url to the file instead of the http_source
This commit is contained in:
parent
05b65b6bc8
commit
2d4202ac09
1 changed files with 3 additions and 3 deletions
|
@ -1064,7 +1064,6 @@ int curlprogress_callback(void *clientp, double dltotal, double dlnow, double ul
|
||||||
void CURLPrepareFile(const char* url, int dfilenum)
|
void CURLPrepareFile(const char* url, int dfilenum)
|
||||||
{
|
{
|
||||||
HTTP_login *login;
|
HTTP_login *login;
|
||||||
char *final_url;
|
|
||||||
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
if (M_CheckParm("-nodownload"))
|
if (M_CheckParm("-nodownload"))
|
||||||
|
@ -1095,11 +1094,12 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
||||||
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
||||||
|
|
||||||
// Authenticate if the user so wishes
|
// Authenticate if the user so wishes
|
||||||
curl_easy_getinfo(http_handle, CURLINFO_EFFECTIVE_URL, &final_url);
|
login = CURLGetLogin(url, NULL);
|
||||||
login = CURLGetLogin(final_url, NULL);
|
|
||||||
|
|
||||||
if (login)
|
if (login)
|
||||||
|
{
|
||||||
curl_easy_setopt(http_handle, CURLOPT_USERPWD, login->auth);
|
curl_easy_setopt(http_handle, CURLOPT_USERPWD, login->auth);
|
||||||
|
}
|
||||||
|
|
||||||
// Follow a redirect request, if sent by the server.
|
// Follow a redirect request, if sent by the server.
|
||||||
curl_easy_setopt(http_handle, CURLOPT_FOLLOWLOCATION, 1L);
|
curl_easy_setopt(http_handle, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
|
|
Loading…
Reference in a new issue