From ca0de8445cd7883e0872510880076c75dbe29845 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 1 Jul 2011 13:49:45 +0000 Subject: [PATCH] applications/luci-splash: semd a WISPr response, allows iPhone to detect Captive Portal while normal browsers are redirected --- .../htdocs/cgi-bin/splash/splash.sh | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh b/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh index 75e3c2edfd..cbffaf6ab3 100755 --- a/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh +++ b/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh @@ -2,24 +2,22 @@ echo -en "Cache-Control: no-cache, max-age=0, no-store, must-revalidate\r\n" echo -en "Pragma: no-cache\r\n" echo -en "Expires: -1\r\n" -echo -en "Status: 403 Forbidden\r\n" -echo -en "Content-Type: text/html\r\n\r\n" -#echo -en "Status: 307 Temporary Redirect\r\n" -#echo -en "Location: http://$SERVER_ADDR/cgi-bin/luci/splash\r\n\r\n" +echo -en "Status: 307 Temporary Redirect\r\n" +echo -en "Location: http://$SERVER_ADDR/cgi-bin/luci/splash\r\n" +echo -en "\r\n" cat < - - Splash - - - -

Splash on $(cat /proc/sys/kernel/hostname)

-

- Redirecting to authentication for $REMOTE_ADDR on $SERVER_ADDR.

- [Click here to continue...] -

- - + + + + 100 + 0 + 1.0 + 12 + $SERVER_ADDR + http://$SERVER_ADDR/cgi-bin/luci/splash?wispr=1 + http://$SERVER_ADDR/ + + EOT -- 2.30.2