diff options
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 9adce546a5..033eb42dbb 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -178,9 +178,9 @@ int CVkProto::SendMsg(MCONTACT hContact, int flags, const char *msg) ULONG msgId = ::InterlockedIncrement(&m_msgId);
AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, "/method/messages.send.json", true, &CVkProto::OnSendMessage)
<< INT_PARAM("type", 0) << INT_PARAM("uid", userID);
- pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+ pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded");
- CMStringA szBody(FORMAT, "message=%s", szMsg);
+ CMStringA szBody(FORMAT, "message=%s", ptrA(mir_urlEncode(szMsg)));
pReq->pData = mir_strdup(szBody);
pReq->dataLength = szBody.GetLength();
pReq->pUserInfo = new CVkSendMsgParam(hContact, msgId);
|