diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/CloudFile/src/http_request.h | 1 | ||||
-rw-r--r-- | protocols/CurrencyRates/src/HTTPSession.cpp | 1 | ||||
-rw-r--r-- | protocols/Facebook/src/avatars.cpp | 1 | ||||
-rw-r--r-- | protocols/Facebook/src/server.cpp | 1 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/avatar.cpp | 4 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/oauth.cpp | 2 | ||||
-rw-r--r-- | protocols/GmailNotifier/src/check.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 1 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/Utils.cpp | 2 | ||||
-rw-r--r-- | protocols/Non-IM Contact/src/http.cpp | 7 | ||||
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_pollserver.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/avatars.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 1 |
16 files changed, 4 insertions, 26 deletions
diff --git a/protocols/CloudFile/src/http_request.h b/protocols/CloudFile/src/http_request.h index f63102f1cc..68be404921 100644 --- a/protocols/CloudFile/src/http_request.h +++ b/protocols/CloudFile/src/http_request.h @@ -24,7 +24,6 @@ private: void Init(int type) { - cbSize = sizeof(NETLIBHTTPREQUEST); requestType = type; flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP; szUrl = NULL; diff --git a/protocols/CurrencyRates/src/HTTPSession.cpp b/protocols/CurrencyRates/src/HTTPSession.cpp index 4c36778cf9..beee03b47c 100644 --- a/protocols/CurrencyRates/src/HTTPSession.cpp +++ b/protocols/CurrencyRates/src/HTTPSession.cpp @@ -38,7 +38,6 @@ bool CHTTPSession::ReadResponce(CMStringW &rsResponce) }; NETLIBHTTPREQUEST nlhr = {}; - nlhr.cbSize = sizeof(nlhr); nlhr.requestType = REQUEST_GET; nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_REDIRECT; nlhr.szUrl = m_szUrl.GetBuffer(); diff --git a/protocols/Facebook/src/avatars.cpp b/protocols/Facebook/src/avatars.cpp index 43b12dcdac..3f514fca9a 100644 --- a/protocols/Facebook/src/avatars.cpp +++ b/protocols/Facebook/src/avatars.cpp @@ -34,7 +34,6 @@ void FacebookProto::GetAvatarFilename(MCONTACT hContact, wchar_t *pwszFileName) void __cdecl FacebookProto::AvatarsUpdate(void *)
{
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.flags = NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
req.requestType = REQUEST_GET;
diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp index 8601cd6db5..72ff76ac1f 100644 --- a/protocols/Facebook/src/server.cpp +++ b/protocols/Facebook/src/server.cpp @@ -761,7 +761,6 @@ void FacebookProto::OnPublishPrivateMessage(const JSONNode &root) std::string szUrl = sticker["thread_image"]["uri"].as_string();
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.flags = NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
req.requestType = REQUEST_GET;
req.szUrl = (char*)szUrl.c_str();
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index 0b713871c3..3ab82cd50f 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -381,8 +381,7 @@ void __cdecl GaduProto::setavatarthread(void *param) char* token = getStringA(GG_KEY_TOKEN);
//construct request
- NETLIBHTTPREQUEST req = { 0 };
- req.cbSize = sizeof(req);
+ NETLIBHTTPREQUEST req = {};
req.requestType = REQUEST_POST;
req.szUrl = "http://avatars.nowe.gg/upload";
req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
@@ -444,7 +443,6 @@ void __cdecl GaduProto::setavatarthread(void *param) //construct 2nd request
memset(&req, 0, sizeof(req));
- req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.szUrl = "http://avatars.nowe.gg/upload";
req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index e7674e959a..932c9c1553 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -327,7 +327,6 @@ int GaduProto::oauth_receivetoken() str = mir_strdup(szUrl);
memset(&req, 0, sizeof(req));
- req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.szUrl = szUrl;
req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
@@ -354,7 +353,6 @@ int GaduProto::oauth_receivetoken() token_secret = nullptr;
memset(&req, 0, sizeof(req));
- req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.szUrl = szUrl;
req.flags = NLHRF_NODUMP | NLHRF_HTTP11 | NLHRF_PERSISTENT;
diff --git a/protocols/GmailNotifier/src/check.cpp b/protocols/GmailNotifier/src/check.cpp index fab62e5283..b5fa2d2dee 100644 --- a/protocols/GmailNotifier/src/check.cpp +++ b/protocols/GmailNotifier/src/check.cpp @@ -72,7 +72,6 @@ void CheckMailInbox(Account *curAcc) }; NETLIBHTTPREQUEST nlr = {}; - nlr.cbSize = sizeof(nlr); nlr.szUrl = szUrl.GetBuffer(); nlr.requestType = REQUEST_POST; nlr.headersCount = _countof(headers); @@ -105,7 +104,6 @@ void CheckMailInbox(Account *curAcc) }; NETLIBHTTPREQUEST nlr = {}; - nlr.cbSize = sizeof(nlr); nlr.szUrl = szUrl.GetBuffer(); nlr.requestType = REQUEST_GET; nlr.headers = headers; diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index b84560dde1..ebd33b3d93 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -50,7 +50,6 @@ void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *ofd) // initialize the netlib request
NETLIBHTTPREQUEST nlhr = {};
- nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_HTTP11 | NLHRF_DUMPASTEXT | NLHRF_REDIRECT;
nlhr.szUrl = (char *)url;
@@ -129,7 +128,6 @@ void CJabberProto::OnReceiveOfflineFile(DB::FILE_BLOB &blob, void *pHandle) void __cdecl CJabberProto::FileReceiveHttpThread(filetransfer *ft)
{
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.requestType = REQUEST_GET;
req.szUrl = ft->httpPath;
@@ -157,7 +155,6 @@ void CJabberProto::FileProcessHttpDownload(MCONTACT hContact, const char *jid, c auto *pszName = szName.c_str();
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.requestType = REQUEST_HEAD;
req.szUrl = (char*)pszUrl;
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index 2124b88a83..e0ede298da 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -694,7 +694,6 @@ LBL_Fail: NETLIBHTTPHEADER hdr[10];
NETLIBHTTPREQUEST nlhr = {};
- nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_PUT;
nlhr.flags = NLHRF_NODUMPSEND | NLHRF_SSL | NLHRF_REDIRECT;
nlhr.szUrl = (char *)szUrl;
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 5d63b0d5a0..e018c39b40 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -882,7 +882,6 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) HNETLIBCONN hHttpCon = nullptr;
for (auto &it : avs) {
NETLIBHTTPREQUEST nlhr = { 0 };
- nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_HTTP11 | NLHRF_REDIRECT | NLHRF_PERSISTENT;
nlhr.szUrl = it->Url;
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp index 50f21c817b..328c63bc8e 100644 --- a/protocols/NewsAggregator/Src/Utils.cpp +++ b/protocols/NewsAggregator/Src/Utils.cpp @@ -50,7 +50,6 @@ void GetNewsData(wchar_t *tszUrl, char **szData, MCONTACT hContact, CFeedEditor NETLIBHTTPREQUEST nlhr = { 0 }; // initialize the netlib request - nlhr.cbSize = sizeof(nlhr); nlhr.requestType = REQUEST_GET; nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_REDIRECT; if (wcsstr(tszUrl, L"https://") != nullptr) @@ -222,7 +221,6 @@ time_t DateToUnixTime(const char *stamp, bool FeedType) bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) { NETLIBHTTPREQUEST nlhr = { 0 }; - nlhr.cbSize = sizeof(nlhr); nlhr.requestType = REQUEST_GET; nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11; char *szUrl = mir_u2a(tszURL); diff --git a/protocols/Non-IM Contact/src/http.cpp b/protocols/Non-IM Contact/src/http.cpp index 466760d790..70804521b4 100644 --- a/protocols/Non-IM Contact/src/http.cpp +++ b/protocols/Non-IM Contact/src/http.cpp @@ -31,16 +31,15 @@ HNETLIBUSER hNetlibUser; // szUrl = URL of the webpage to be retrieved // return value = 0 for success, 1 or HTTP error code for failure // global var used: szData, szInfo = containing the retrieved data -// + int InternetDownloadFile(char *szUrl) { - NETLIBHTTPREQUEST nlhr = { 0 }; - // initialize the netlib request - nlhr.cbSize = sizeof(nlhr); + NETLIBHTTPREQUEST nlhr = {}; nlhr.requestType = REQUEST_GET; nlhr.flags = NLHRF_DUMPASTEXT; nlhr.szUrl = szUrl; + // change the header so the plugin is pretended to be IE 6 + WinXP nlhr.headersCount++; nlhr.headers = (NETLIBHTTPHEADER*)malloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount); diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 6c5dcc8341..4378651b6f 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -1469,7 +1469,6 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport if (GetFileAttributesW(wszFileName) == INVALID_FILE_ATTRIBUTES) {
T2Utf szUrl(wszUrl);
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.flags = NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
req.requestType = REQUEST_GET;
req.szUrl = szUrl;
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp index 9c222f430c..1597b439ca 100644 --- a/protocols/VKontakte/src/vk_pollserver.cpp +++ b/protocols/VKontakte/src/vk_pollserver.cpp @@ -254,7 +254,6 @@ 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)
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.requestType = REQUEST_GET;
req.szUrl = szReqUrl.GetBuffer();
req.flags = VK_NODUMPHEADERS | NLHRF_PERSISTENT | NLHRF_HTTP11 | NLHRF_SSL;
diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp index 7be5b1d412..39e521eff3 100644 --- a/protocols/WhatsApp/src/avatars.cpp +++ b/protocols/WhatsApp/src/avatars.cpp @@ -131,7 +131,6 @@ void WhatsAppProto::ServerFetchAvatar(const char *jid) bool CMPlugin::SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai)
{
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.flags = NLHRF_NODUMP | NLHRF_PERSISTENT | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
req.requestType = REQUEST_GET;
req.szUrl = (char*)pszUrl;
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index c49821e21e..3d3650c043 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -522,7 +522,6 @@ MBinBuffer WhatsAppProto::DownloadEncryptedFile(const char *url, const ProtobufC NETLIBHTTPHEADER headers[1] = {{"Origin", "https://web.whatsapp.com"}};
NETLIBHTTPREQUEST req = {};
- req.cbSize = sizeof(req);
req.requestType = REQUEST_GET;
req.szUrl = (char*)url;
req.headersCount = _countof(headers);
|