summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-07-01 13:49:45 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-07-01 13:49:45 +0000
commitca0de8445cd7883e0872510880076c75dbe29845 (patch)
tree11e8aac3b2f75bd0b780091a994e6acf9d24fb1b /applications/luci-splash/htdocs
parenteb8908bcea3ad891492864aa22e2db5e02b395c3 (diff)
applications/luci-splash: semd a WISPr response, allows iPhone to detect Captive Portal while normal browsers are redirected
Diffstat (limited to 'applications/luci-splash/htdocs')
-rwxr-xr-xapplications/luci-splash/htdocs/cgi-bin/splash/splash.sh32
1 files 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 75e3c2edf..cbffaf6ab 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 <<EOT
-<html>
- <head>
- <title>Splash</title>
- <meta http-equiv="refresh" content="0; url=http://$SERVER_ADDR/cgi-bin/luci/splash" />
- </head>
- <body style="font-family:sans-serif">
- <h1>Splash on $(cat /proc/sys/kernel/hostname)</h1>
- <p>
- Redirecting to authentication for $REMOTE_ADDR on $SERVER_ADDR.<br /><br />
- [<a href="http://$SERVER_ADDR/cgi-bin/luci/splash">Click here to continue...</a>]
- </p>
- </body>
-</html>
+<?xml version="1.0" encoding="UTF-8"?>
+<WISPAccessGatewayParam xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.wballiance.net/wispr_2_0.xsd">
+ <Redirect>
+ <MessageType>100</MessageType>
+ <ResponseCode>0</ResponseCode>
+ <AccessProcedure>1.0</AccessProcedure>
+ <AccessLocation>12</AccessLocation>
+ <LocationName>$SERVER_ADDR</LocationName>
+ <LoginURL>http://$SERVER_ADDR/cgi-bin/luci/splash?wispr=1</LoginURL>
+ <AbortLoginURL>http://$SERVER_ADDR/</AbortLoginURL>
+ </Redirect>
+</WISPAccessGatewayParam>
EOT