More better error handling
git-svn-id: http://svn.openlayers.org/trunk/openlayers@286 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -19,9 +19,9 @@ fs = cgi.FieldStorage()
|
||||
url = fs.getvalue('url', "http://openlayers.org")
|
||||
|
||||
allowedHosts = ['www.openlayers.org', 'openlayers.org', 'octo.metacarta.com']
|
||||
host = url.split("/")[2]
|
||||
|
||||
try:
|
||||
host = url.split("/")[2]
|
||||
if allowedHosts and not host in allowedHosts:
|
||||
print "Status: 502 Bad Gateway"
|
||||
print "Content-Type: text/plain"
|
||||
|
||||
Reference in New Issue
Block a user