More better error handling

git-svn-id: http://svn.openlayers.org/trunk/openlayers@286 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-23 16:33:07 +00:00
parent 29fc44105f
commit 69f06802ca

View File

@@ -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"