From 50351222fcb270449c1bc452ea590704ee403416 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Dec 2018 23:35:05 +0300 Subject: Facebook -> sync MHttpRequest --- protocols/FacebookRM/src/login.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'protocols/FacebookRM/src/login.cpp') 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) -- cgit v1.2.3