Comment 6 for bug 1039042

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote : Re: Detect captive portals when connecting to WiFi [$25]

Of note: this is also considered a walled garden in addition to captive portal. In case that helps anyone. Also, here is the code Android uses to do its detection:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/net/wifi/WifiWatchdogStateMachine.java#WifiWatchdogStateMachine.isWalledGardenConnection%28%29

This works because a captive portal will not return a 204 if it is rerouting traffic.