From 0d5bd6321915c753dc569bad02f161f03c4c7ad4 Mon Sep 17 00:00:00 2001 From: HearSilent Date: Fri, 25 Sep 2015 14:10:03 +0800 Subject: [PATCH] Fix login bug (Windows), Fix logout bug (Android, Windows), Update version to 2.1.6. --- Android/app/build.gradle | 4 +-- .../kuas/wifiautologin/libs/LoginHelper.java | 3 +- Windows/KUAS WiFi/LoginFrm.vb | 29 +++++++++++++++---- Windows/KUAS WiFi/My Project/AssemblyInfo.vb | 4 +-- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Android/app/build.gradle b/Android/app/build.gradle index 3c43677..487471c 100644 --- a/Android/app/build.gradle +++ b/Android/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "tw.edu.kuas.wifiautologin" minSdkVersion 9 targetSdkVersion 22 - versionCode 215 - versionName "2.1.5" + versionCode 216 + versionName "2.1.6" } buildTypes { debug { diff --git a/Android/app/src/main/java/tw/edu/kuas/wifiautologin/libs/LoginHelper.java b/Android/app/src/main/java/tw/edu/kuas/wifiautologin/libs/LoginHelper.java index a274519..0c1231f 100644 --- a/Android/app/src/main/java/tw/edu/kuas/wifiautologin/libs/LoginHelper.java +++ b/Android/app/src/main/java/tw/edu/kuas/wifiautologin/libs/LoginHelper.java @@ -417,7 +417,7 @@ private static void checkLogoutLocation(final Context context, final GeneralCall if (!location.equals("")) { if (location.contains("login_online")) { logout(context, callback, Constant.JIANGONG_WIFI_SERVER); - } else if (location.contains("auth_entry")) { + } else if (location.contains("login.php")) { tracker.send( new HitBuilders.EventBuilder().setCategory("onFailure").setAction("Logout") .setLabel("Already logged out").build()); @@ -498,6 +498,7 @@ private static void retryLogin(Context context, final LinkedHashMap隨同HTTP請求發送的Cookie信息,如果不需要身分驗證可以為空 ''' Public Shared Function CreateGetHttpResponse(url As String, timeout As System.Nullable(Of Integer), userAgent As String, cookies As CookieContainer) As HttpWebResponse + System.Net.ServicePointManager.Expect100Continue = False '防止417 + If String.IsNullOrEmpty(url) Then Throw New ArgumentNullException("url") End If diff --git a/Windows/KUAS WiFi/My Project/AssemblyInfo.vb b/Windows/KUAS WiFi/My Project/AssemblyInfo.vb index 3c02bd8..2ea196b 100644 --- a/Windows/KUAS WiFi/My Project/AssemblyInfo.vb +++ b/Windows/KUAS WiFi/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' 指定為預設值: ' - - + +