use old code since disabling HTTP/1.1 works with that too

This commit is contained in:
Berke Viktor 2012-02-04 20:24:30 +01:00
parent c73149cf44
commit 8849fb4c10
1 changed files with 24 additions and 15 deletions

View File

@ -33,26 +33,20 @@ static const char version[] = "2.1";
static char* static char*
check_version () check_version ()
{ {
#if 0
/* Google Code's messing up with requests, use HTTP/1.0 as suggested. More info:
http://code.google.com/p/support/issues/detail?id=6095
Of course it would be still too simple, coz IE will override settings, so
you have to disable HTTP/1.1 manually and globally. More info:
http://support.microsoft.com/kb/258425
*/
HINTERNET hINet, hFile; HINTERNET hINet, hFile;
hINet = InternetOpen ("Update Checker", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); hINet = InternetOpen ("Update Checker", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (!hINet) if (!hINet)
{ {
return "Unknown"; return "Unknown";
} }
hFile = InternetOpenUrl (hINet, "http://xchat-wdk.googlecode.com/git/version.txt?r=wdk", NULL, 0, INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD, 0); hFile = InternetOpenUrl (hINet,
"http://xchat-wdk.googlecode.com/git/version.txt?r=wdk",
NULL,
0,
INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD,
0);
if (hFile) if (hFile)
{ {
static char buffer[1024]; static char buffer[1024];
@ -67,12 +61,26 @@ check_version ()
} }
InternetCloseHandle (hFile); InternetCloseHandle (hFile);
InternetCloseHandle (hINet);
return buffer; return buffer;
} }
InternetCloseHandle (hINet); InternetCloseHandle (hINet);
return "Unknown"; return "Unknown";
#endif
#if 0
/* Google Code's messing up with requests, use HTTP/1.0 as suggested. More info:
http://code.google.com/p/support/issues/detail?id=6095
Of course it would be still too simple, coz IE will override settings, so
you have to disable HTTP/1.1 manually and globally. More info:
http://support.microsoft.com/kb/258425
So this code's basically useless since disabling HTTP/1.1 will work with the
above code too.
*/
static char buffer[1024]; static char buffer[1024];
DWORD dwRead; DWORD dwRead;
@ -134,6 +142,7 @@ check_version ()
InternetCloseHandle (hOpen); InternetCloseHandle (hOpen);
return buffer; return buffer;
} }
#endif
} }
static int static int