summaryrefslogtreecommitdiff
path: root/protocols/Non-IM Contact/src/http.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-04 11:24:49 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-04 11:24:49 +0300
commit2b6d50f7fdfaca84c3ee82909800ad67d2e99bdc (patch)
tree0fa8e6a2bb01de68127d9e45c27978fb43e267c3 /protocols/Non-IM Contact/src/http.cpp
parent9ae82271f8dc01e32df1c76cfec64771bc5ee6d0 (diff)
NETLIBHTTPREQUEST::cbSize = old unused field removed
Diffstat (limited to 'protocols/Non-IM Contact/src/http.cpp')
-rw-r--r--protocols/Non-IM Contact/src/http.cpp7
1 files changed, 3 insertions, 4 deletions
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);