summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/login.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-21 23:35:05 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-21 23:35:05 +0300
commit50351222fcb270449c1bc452ea590704ee403416 (patch)
treee1dcebde8130f85b1af334d1eeae19220d459f38 /protocols/FacebookRM/src/login.cpp
parent87694f0fb5d928952c1480a34cb4eb6e13b80259 (diff)
Facebook -> sync MHttpRequest
Diffstat (limited to 'protocols/FacebookRM/src/login.cpp')
-rw-r--r--protocols/FacebookRM/src/login.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/protocols/FacebookRM/src/login.cpp b/protocols/FacebookRM/src/login.cpp
index 6f2e07719f..05d66e8f1d 100644
--- a/protocols/FacebookRM/src/login.cpp
+++ b/protocols/FacebookRM/src/login.cpp
@@ -29,7 +29,7 @@ HttpRequest* facebook_client::loginRequest()
{
HttpRequest *p = new HttpRequest(REQUEST_POST, FACEBOOK_SERVER_LOGIN "/login.php");
p->flags |= NLHRF_NODUMP;
- p->Url << INT_PARAM("login_attempt", 1);
+ p << INT_PARAM("login_attempt", 1);
return p;
}
@@ -39,9 +39,11 @@ HttpRequest* facebook_client::loginRequest(const char *username, const char *pas
p->flags |= NLHRF_NODUMP;
p->Persistent = p->NONE;
- p->Url
- << INT_PARAM("login_attempt", 1)
- << urlData; // additional data parsed from form
+ p << INT_PARAM("login_attempt", 1);
+ if (mir_strlen(urlData)) {
+ p->m_szParam.AppendChar('&');
+ p->m_szParam.Append(urlData); // additional data parsed from form
+ }
p->Body
<< INT_PARAM("persistent", 1)
@@ -60,7 +62,7 @@ HttpRequest* facebook_client::loginSmsRequest(const char *dtsg)
{
HttpRequest *p = new HttpRequest(REQUEST_POST, FACEBOOK_SERVER_REGULAR "/ajax/login/approvals/send_sms");
- p->Url << INT_PARAM("dpr", 1);
+ p << INT_PARAM("dpr", 1);
p->Body
<< CHAR_PARAM("method_requested", "sms_requested")
@@ -84,7 +86,7 @@ HttpRequest* facebook_client::loginSmsRequest(const char *dtsg)
HttpRequest* facebook_client::setupMachineRequest()
{
HttpRequest *p = new HttpRequest(REQUEST_POST, FACEBOOK_SERVER_REGULAR "/checkpoint/");
- p->Url << "next";
+ p->m_szParam.Append("next");
return p;
}
@@ -92,7 +94,7 @@ HttpRequest* facebook_client::setupMachineRequest(const char *dtsg, const char *
{
HttpRequest *p = new HttpRequest(REQUEST_POST, FACEBOOK_SERVER_REGULAR "/checkpoint/");
- p->Url << "next";
+ p->m_szParam.Append("next");
p->Body
<< CHAR_PARAM(CMStringA(::FORMAT, "submit[%s]", submit), submit)