From a2cbb34b00f6de9d7f5d49fad02dc6f94ccf81db Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 27 May 2015 22:08:58 +0000 Subject: Steam: reworked login git-svn-id: http://svn.miranda-ng.org/main/trunk@13865 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/api/rsa_key.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'protocols/Steam/src/api/rsa_key.h') diff --git a/protocols/Steam/src/api/rsa_key.h b/protocols/Steam/src/api/rsa_key.h index 6b938a48ef..1cf33d15ab 100644 --- a/protocols/Steam/src/api/rsa_key.h +++ b/protocols/Steam/src/api/rsa_key.h @@ -1,15 +1,18 @@ #ifndef _STEAM_REQUEST_RSA_KEY_H_ #define _STEAM_REQUEST_RSA_KEY_H_ -class RsaKeyRequest : public HttpRequest +class GetRsaKeyRequest : public HttpRequest { public: - RsaKeyRequest(const char *username) : - HttpRequest(REQUEST_GET, STEAM_WEB_URL "/mobilelogin/getrsakey") + GetRsaKeyRequest(const char *username) : + HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobilelogin/getrsakey/") { flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP; - AddParameter("username", (char*)username); + AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); + + CMStringA data(CMStringDataFormat::FORMAT, "username=%s&donotcache=%lld", ptrA(mir_urlEncode(username)), time(NULL)); + SetData(data.GetBuffer(), data.GetLength()); } }; -- cgit v1.2.3