Commit e7babeac authored by Jens Vagelpohl's avatar Jens Vagelpohl

- refining the fix for LP #143533

parent 19c7ac41
......@@ -14,9 +14,10 @@ Bugs Fixed
- LP #143755: Also catch TypeError when trying to determine an
indexable value for an object in PluginIndexes.common.UnIndex
- LP #143533: Instead of showing "0.0.0.0" as server name when no
specific listening IP is configured for the HTTP server, do a
socket lookup to show the current server's fully qualified name.
- LP #143533: Instead of showing "0.0.0.0" as the SERVER_NAME
request variable when no specific listening IP is configured for
the HTTP server, do a socket lookup to show the current server's
fully qualified name.
- LP #143722: Added missing permission to ObjectManager.manage_hasId,
which prevented renaming files and folders via FTP.
......
......@@ -185,7 +185,7 @@ class zhttp_handler:
env = {}
env['REQUEST_METHOD']=request.command.upper()
env['SERVER_PORT']=str(server.port)
env['SERVER_NAME']=server.server_name
env['SERVER_NAME']=server.request_server_name
env['SERVER_SOFTWARE']=server.SERVER_IDENT
env['SERVER_PROTOCOL']="HTTP/"+request.version
env['channel.creation_time']=request.channel.creation_time
......@@ -447,10 +447,12 @@ class zhttp_server(http_server):
self.shutup=1
self.fast_listen = fast_listen
http_server.__init__(self, ip, port, resolver, logger_object)
if self.server_name == '0.0.0.0':
# Workaround to set a more descriptive server_name
self.request_server_name = self.server_name
if self.request_server_name == '0.0.0.0':
# Workaround to set a more descriptive server name
# for use in the Request SERVER_NAME variable
try:
self.server_name = socket.getfqdn()
self.request_server_name = socket.getfqdn()
except socket.error:
pass
self.shutup=0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment