summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-30 13:05:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-30 13:05:31 +0300
commite6fe149ed0269b963a285372c5adc9e35a972bfd (patch)
tree8f730b77d6051bcf91cdca5f3dfb0bd887f13cea /protocols/ICQ-WIM/src
parent776762315028688643d6cf8c1effee0dc0b9d20c (diff)
ICQ-WIM: explicit content-type specification for RAPI connections
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r--protocols/ICQ-WIM/src/http.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/ICQ-WIM/src/http.cpp b/protocols/ICQ-WIM/src/http.cpp
index d365b6e06e..693f320ca1 100644
--- a/protocols/ICQ-WIM/src/http.cpp
+++ b/protocols/ICQ-WIM/src/http.cpp
@@ -147,6 +147,7 @@ bool CIcqProto::ExecuteRequest(AsyncHttpRequest *pReq)
if (pReq->m_conn == CONN_RAPI) {
CMStringA szAgent(FORMAT, "%S Mail.ru Windows ICQ (version 10.0.1999)", (wchar_t*)m_szOwnId);
pReq->AddHeader("User-Agent", szAgent);
+ pReq->AddHeader("Content-Type", "application/json");
if (m_szRToken.IsEmpty()) {
if (!RefreshRobustToken()) {
@@ -155,7 +156,8 @@ bool CIcqProto::ExecuteRequest(AsyncHttpRequest *pReq)
}
}
- pReq->ReplaceJsonParam(JSONNode("clientId", m_iRClientId));
+ if (m_iRClientId)
+ pReq->ReplaceJsonParam(JSONNode("clientId", m_iRClientId));
pReq->ReplaceJsonParam(JSONNode("authToken", m_szRToken));
pReq->dataLength = pReq->m_szParam.GetLength();
pReq->pData = mir_strdup(pReq->m_szParam);