From b46679b2ce32dcd697431eb7155f3ed9864afe8d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 17 Sep 2013 15:22:09 +0530 Subject: [PATCH] [wsgi] [minor] fixed request host name --- webnotes/utils/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webnotes/utils/__init__.py b/webnotes/utils/__init__.py index 0211ed73b8..286690b59d 100644 --- a/webnotes/utils/__init__.py +++ b/webnotes/utils/__init__.py @@ -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'