[wsgi] [minor] fixed request host name

This commit is contained in:
Rushabh Mehta 2013-09-17 15:22:09 +05:30
parent bceb3cec1a
commit b46679b2ce

View file

@ -71,9 +71,8 @@ def get_request_site_address(full_address=False):
host_name = conf.host_name
else:
try:
host = webnotes.request.host
protocol = 'HTTPS' in webnotes.get_request_header('SERVER_PROTOCOL') and 'https://' or 'http://'
host_name = protocol + webnotes.get_request_header('HTTP_HOST')
host_name = protocol + webnotes.request.host
except TypeError:
return 'http://localhost'