mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
android 5 startup null value
This commit is contained in:
parent
7705c99650
commit
4e47659bc8
1 changed files with 5 additions and 1 deletions
|
@ -228,6 +228,8 @@ def android(environ, start_response):
|
||||||
else:
|
else:
|
||||||
ip = environ['REMOTE_ADDR'].strip()
|
ip = environ['REMOTE_ADDR'].strip()
|
||||||
system,system_version = platform_info(ip)
|
system,system_version = platform_info(ip)
|
||||||
|
if not system_version:
|
||||||
|
put_302(environ, start_response)
|
||||||
if system_version[0:1] < '6':
|
if system_version[0:1] < '6':
|
||||||
logger.debug("system < 6:%s"%system_version)
|
logger.debug("system < 6:%s"%system_version)
|
||||||
location = '/android_splash'
|
location = '/android_splash'
|
||||||
|
@ -390,10 +392,12 @@ def put_204(environ, start_response):
|
||||||
def put_302(environ, start_response):
|
def put_302(environ, start_response):
|
||||||
status = '302 Moved Temporarily'
|
status = '302 Moved Temporarily'
|
||||||
response_body = ''
|
response_body = ''
|
||||||
|
location = "http://" + fully_qualified_domain_name + "/home"
|
||||||
response_headers = [('Content-type','text/html'),
|
response_headers = [('Content-type','text/html'),
|
||||||
|
('Location',location),
|
||||||
('Content-Length',str(len(response_body)))]
|
('Content-Length',str(len(response_body)))]
|
||||||
start_response(status, response_headers)
|
start_response(status, response_headers)
|
||||||
logger.debug("in function put_204: sending 204 html response")
|
logger.debug("in function put_302: sending 302 html response")
|
||||||
return [response_body]
|
return [response_body]
|
||||||
|
|
||||||
def parse_agent(agent):
|
def parse_agent(agent):
|
||||||
|
|
Loading…
Reference in a new issue