Skip to content

Commit

Permalink
Fix login bug (Windows), [WIP] should fix has login check.
Browse files Browse the repository at this point in the history
  • Loading branch information
hearsilent committed Sep 25, 2015
1 parent 0d5bd63 commit 92a0ddc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Windows/KUAS WiFi/LoginFrm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,10 @@ Public Class LoginFrm
disableViews()

Try
Dim response As HttpWebResponse = HttpWebResponseUtility.CreateGetHttpResponse("https://www.example.com/", 7000, Nothing, Nothing)
Dim response As HttpWebResponse = HttpWebResponseUtility.CreateGetHttpResponse("http://" + JIANGONG_WIFI_SERVER, 7000, Nothing, Nothing)
Dim reader As StreamReader = New StreamReader(response.GetResponseStream, System.Text.Encoding.GetEncoding("UTF-8"))
Dim respHTML As String = reader.ReadToEnd()
If (response.StatusCode = 200) Then
MsgBox("您已經登入或是有可用網路了。", MsgBoxStyle.Information, "高應無線通")
enableViews()
Else
checkLoginLocation(response.Headers.[Get]("Location"))
End If
checkLoginLocation(response.Headers.[Get]("Location"))
response.Close()
Catch ex As Exception
MsgBox("請求 Wi-Fi 伺服器的連線逾時。", MsgBoxStyle.Critical, "高應無線通")
Expand Down

0 comments on commit 92a0ddc

Please sign in to comment.