Skip to content
Browse files

Serve Success Page for iOS devices

  • Loading branch information...
1 parent cdb87bb commit 6a1e7cac46f7904c4403bdc84aaaa03f335c404b @MaStr committed Apr 2, 2012
Showing with 19 additions and 1 deletion.
  1. +19 −1 piratebox/piratebox/bin/droopy
View
20 piratebox/piratebox/bin/droopy
@@ -6,6 +6,7 @@
# Licensed under the New BSD License.
# Changelog
+# 20120402 * Return success Message for iOS devices # Thank you "Reventlov"
# 20120401 * Input of chatbox from outside... extend modularisation
# 20120317 * MStrubel; no upload of index.html
# 20110314 * MStrubel; hostname as param
@@ -229,8 +230,21 @@ linkurltmpl = '''<div class="box">
<a href="http://stackp.online.fr/droopy-ip.php?port=%(port)d"> %(discover)s
</a></div>'''
+# 20120402 Start
+iostmpl = ''' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+ <HTML>
+ <HEAD>
+ <TITLE>Success</TITLE>
+ </HEAD>
+ <BODY>
+ Success
+ </BODY>
+ </HTML> '''
-templates = {"main": maintmpl, "success": successtmpl, "error": errortmpl}
+
+# 20120402
+templates = { "ios": iostmpl, "main": maintmpl, "success": successtmpl, "error": errortmpl }
+# 20120402 End
# -- Translations
@@ -614,6 +628,10 @@ class HTTPUploadHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.send_header('Content-type', mimetypes.guess_type(picture)[0])
self.end_headers()
self.wfile.write(open(picture, 'rb').read())
+# 20120402 Start
+ elif self.path == '/library/test/success.html':
+ self.send_html(self.html("ios"))
+# 20120402 End
else:
self.send_html(self.html("main"))

0 comments on commit 6a1e7ca

Please sign in to comment.
Something went wrong with that request. Please try again.