summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
commit110fdc1157d94f5d787a21c60163681767fdd6c4 (patch)
tree3a401fa5b6d10e397784f4a7aa1cda38beee9fb9 /protocols/VKontakte/src
parent74c01c7fb7862ec01ad27c4b225b08b7aa0f3b0a (diff)
more strict constructor of MHttpRequest to avoid quirks
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r--protocols/VKontakte/src/misc.cpp3
-rw-r--r--protocols/VKontakte/src/vk_captcha.cpp3
-rw-r--r--protocols/VKontakte/src/vk_pollserver.cpp3
3 files changed, 3 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index c3abf2d9ec..3f15bcac16 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1469,9 +1469,8 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
if (GetFileAttributesW(wszFileName) == INVALID_FILE_ATTRIBUTES) {
T2Utf szUrl(wszUrl);
- MHttpRequest req;
+ MHttpRequest req(REQUEST_GET);
req.flags = NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
- req.requestType = REQUEST_GET;
req.m_szUrl = szUrl.get();
MHttpResponse *pReply = Netlib_HttpTransaction(m_hNetlibUser, &req);
diff --git a/protocols/VKontakte/src/vk_captcha.cpp b/protocols/VKontakte/src/vk_captcha.cpp
index 5ff52d732f..3969850fe8 100644
--- a/protocols/VKontakte/src/vk_captcha.cpp
+++ b/protocols/VKontakte/src/vk_captcha.cpp
@@ -33,8 +33,7 @@ bool CVkProto::RunCaptchaForm(LPCSTR szUrl, CMStringA &result)
Utils_OpenUrl(szCaptchaAssistant);
}
else {
- MHttpRequest req;
- req.requestType = REQUEST_GET;
+ MHttpRequest req(REQUEST_GET);
req.m_szUrl = (LPSTR)szUrl;
req.flags = VK_NODUMPHEADERS;
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp
index 8d6b9abae9..10bd5c7e43 100644
--- a/protocols/VKontakte/src/vk_pollserver.cpp
+++ b/protocols/VKontakte/src/vk_pollserver.cpp
@@ -253,8 +253,7 @@ int CVkProto::PollServer()
CMStringA szReqUrl(FORMAT, "https://%s?act=a_check&key=%s&ts=%s&wait=25&access_token=%s&mode=%d&version=%d", m_szPollingServer, m_szPollingKey, m_szPollingTs, m_szAccessToken, 106, 2);
// see mode parametr description on https://vk.com/dev/using_longpoll (Russian version)
- MHttpRequest req;
- req.requestType = REQUEST_GET;
+ MHttpRequest req(REQUEST_GET);
req.m_szUrl = szReqUrl.GetBuffer();
req.flags = VK_NODUMPHEADERS | NLHRF_PERSISTENT | NLHRF_HTTP11 | NLHRF_SSL;
req.timeout = 30000;