892
edits
Line 23: | Line 23: | ||
The code that uses the HTTP 204 method is [https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/CaptivePortalTracker.java here]. This is the master branch, which I assume is latest stable or latest development, so I'm not sure what this "faster captive portal detection" in 4.2.2 is supposed to mean. | The code that uses the HTTP 204 method is [https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/CaptivePortalTracker.java here]. This is the master branch, which I assume is latest stable or latest development, so I'm not sure what this "faster captive portal detection" in 4.2.2 is supposed to mean. | ||
== Mac OS | == Mac OS == | ||
No idea. Maybe the same as iOS? | |||
== iOS == | |||
Here is the sequence of events, as verified by [[User:Juul|Juul]] ([[User talk:Juul|talk]]) using an iPhone running iOS 5.0.1: | |||
First a DNS lookup is issued for www.apple.com. Next the following HTTP GET is issued: | |||
<pre> | |||
GET /library/test/success.html HTTP/1.0 | |||
Host: www.apple.com | |||
User-Agent: CaptiveNetworkSupport-183 wispr | |||
Connection: close | |||
</pre> | |||
The result that it expects is an HTTP 200 with this content: | |||
<pre> | |||
<HTML><HEAD><TITLE>Success</TITLE></HEAD><BODY>Success</BODY></HTML> | |||
</pre> | |||
If it gets anything else, then it will do the following HTTP GET: | |||
<pre> | <pre> | ||
GET / HTTP/1.1 | |||
Host: www.apple.com | |||
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9A405 | |||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |||
Accept-Language: en-us | |||
Accept-Encoding: gzip, d | |||
</pre> | </pre> | ||
and present the response as the splash page. | |||
== Windows == | == Windows == |