diff options
author | Berke Viktor <berkeviktor@aol.com> | 2012-02-04 20:24:30 +0100 |
---|---|---|
committer | Berke Viktor <berkeviktor@aol.com> | 2012-02-04 20:24:30 +0100 |
commit | 8849fb4c108f5f6341e341bcbf6db50bf6f84737 (patch) | |
tree | 8486b73927249ce59c2ef57bd608d8f2c5920672 /plugins/upd | |
parent | c73149cf44779965b76377526ffe6789dfef2131 (diff) |
use old code since disabling HTTP/1.1 works with that too
Diffstat (limited to 'plugins/upd')
-rw-r--r-- | plugins/upd/upd.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/plugins/upd/upd.c b/plugins/upd/upd.c index b85755cb..baf5b85b 100644 --- a/plugins/upd/upd.c +++ b/plugins/upd/upd.c @@ -33,26 +33,20 @@ static const char version[] = "2.1"; static char* 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; hINet = InternetOpen ("Update Checker", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); - + if (!hINet) { 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) { static char buffer[1024]; @@ -67,12 +61,26 @@ check_version () } InternetCloseHandle (hFile); + InternetCloseHandle (hINet); return buffer; } - + InternetCloseHandle (hINet); 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]; DWORD dwRead; @@ -134,6 +142,7 @@ check_version () InternetCloseHandle (hOpen); return buffer; } +#endif } static int |