Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (6 sloc) 174 Bytes
import os
port = os.environ['SERVER_PORT']
if port and port != '80':
HOST_NAME = '%s:%s' % (os.environ['SERVER_NAME'], port)
else:
HOST_NAME = os.environ['SERVER_NAME']