diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-09 13:13:23 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-09 13:13:23 +0300 |
commit | 110fdc1157d94f5d787a21c60163681767fdd6c4 (patch) | |
tree | 3a401fa5b6d10e397784f4a7aa1cda38beee9fb9 /protocols/Facebook | |
parent | 74c01c7fb7862ec01ad27c4b225b08b7aa0f3b0a (diff) |
more strict constructor of MHttpRequest to avoid quirks
Diffstat (limited to 'protocols/Facebook')
-rw-r--r-- | protocols/Facebook/src/avatars.cpp | 3 | ||||
-rw-r--r-- | protocols/Facebook/src/server.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Facebook/src/avatars.cpp b/protocols/Facebook/src/avatars.cpp index ba5ae845ec..b395da7805 100644 --- a/protocols/Facebook/src/avatars.cpp +++ b/protocols/Facebook/src/avatars.cpp @@ -33,9 +33,8 @@ void FacebookProto::GetAvatarFilename(MCONTACT hContact, wchar_t *pwszFileName) void __cdecl FacebookProto::AvatarsUpdate(void *)
{
- MHttpRequest req;
+ MHttpRequest req(REQUEST_GET);
req.flags = NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
- req.requestType = REQUEST_GET;
CMStringA szParams((m_bUseBigAvatars) ? "type=large" : "type=normal");
szParams.AppendFormat("&access_token=%s", m_szAuthToken.c_str());
diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp index 69cb6b6940..63b292a77e 100644 --- a/protocols/Facebook/src/server.cpp +++ b/protocols/Facebook/src/server.cpp @@ -760,9 +760,8 @@ void FacebookProto::OnPublishPrivateMessage(const JSONNode &root) // wszFileName.Format(L"%s\\STK{%S}.webp", wszPath.c_str(), stickerId.c_str());
std::string szUrl = sticker["thread_image"]["uri"].as_string();
- MHttpRequest req;
+ MHttpRequest req(REQUEST_GET);
req.flags = NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
- req.requestType = REQUEST_GET;
req.m_szUrl = szUrl.c_str();
MHttpResponse *pReply = Netlib_HttpTransaction(m_hNetlibUser, &req);
|