summaryrefslogtreecommitdiff
path: root/protocols/Weather/weather_http.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-08-23 09:59:01 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-08-23 09:59:01 +0000
commit38fd059aded00e4ed846bf35779f4bbcf7133f0d (patch)
tree83880b3180d28767450e760ded72153f1aaa99fa /protocols/Weather/weather_http.cpp
parent30d46fcb06781d1277483208488596daab65d09a (diff)
*fix for logging UTF8 events
*fix for unicode logging *fix for unicode templates *removed support for old Miranda git-svn-id: http://svn.miranda-ng.org/main/trunk@1524 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Weather/weather_http.cpp')
-rw-r--r--protocols/Weather/weather_http.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/Weather/weather_http.cpp b/protocols/Weather/weather_http.cpp
index 2a3796de66..bfeb6fe727 100644
--- a/protocols/Weather/weather_http.cpp
+++ b/protocols/Weather/weather_http.cpp
@@ -50,19 +50,16 @@ int InternetDownloadFile (char *szUrl, char* cookie, TCHAR** szData)
{
int result = 0xBADBAD;
char* szRedirUrl = NULL;
- NETLIBHTTPREQUEST nlhr = {0}, *nlhrReply;
+ NETLIBHTTPREQUEST nlhr = {0};
NETLIBHTTPHEADER headers[6];
// initialize the netlib request
nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_GET;
- nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11;
+ nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_PERSISTENT | NLHRF_REDIRECT;
nlhr.szUrl = szUrl;
nlhr.nlc = hNetlibHttp;
- if (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= PLUGIN_MAKE_VERSION(0,9,0,5))
- nlhr.flags |= NLHRF_PERSISTENT | NLHRF_REDIRECT;
-
// change the header so the plugin is pretended to be IE 6 + WinXP
nlhr.headersCount = 5;
nlhr.headers = headers;
@@ -83,7 +80,7 @@ int InternetDownloadFile (char *szUrl, char* cookie, TCHAR** szData)
while (result == 0xBADBAD) {
// download the page
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,
(WPARAM)hNetlibUser,(LPARAM)&nlhr);
if (nlhrReply) {
@@ -190,9 +187,9 @@ void NetlibInit(void)
{
NETLIBUSER nlu = {0};
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS|NUF_NOHTTPSOPTION;
+ nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS|NUF_NOHTTPSOPTION|NUF_TCHAR;
nlu.szSettingsModule = WEATHERPROTONAME;
- nlu.szDescriptiveName = Translate("Weather HTTP connections");
+ nlu.ptszDescriptiveName = TranslateT("Weather HTTP connections");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER,0,(LPARAM)&nlu);
}