allow only 1 redirect when POSTing login info

This commit is contained in:
Sude 2013-03-16 21:48:52 +02:00
parent 53f82e5c96
commit dab6bd937e

View File

@ -957,10 +957,12 @@ int Downloader::HTTP_Login(const std::string& email, const std::string& password
curl_easy_setopt(curlhandle, CURLOPT_POSTFIELDS, postdata.c_str());
curl_easy_setopt(curlhandle, CURLOPT_WRITEDATA, &memory);
curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curlhandle, CURLOPT_MAXREDIRS, 1);
curl_easy_setopt(curlhandle, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
curl_easy_perform(curlhandle);
memory.str(std::string());
curl_easy_setopt(curlhandle, CURLOPT_HTTPGET, 1);
curl_easy_setopt(curlhandle, CURLOPT_MAXREDIRS, -1);
json = this->getResponse("http://www.gog.com/user/ajax/?a=get");
parsingSuccessful = jsonparser->parse(json, root);