Commit b1eab975 authored by Jens Vagelpohl's avatar Jens Vagelpohl

- refining the fix for LP #143533

parent bc7b6a13
...@@ -14,9 +14,10 @@ Bugs Fixed ...@@ -14,9 +14,10 @@ Bugs Fixed
- LP #143755: Also catch TypeError when trying to determine an - LP #143755: Also catch TypeError when trying to determine an
indexable value for an object in PluginIndexes.common.UnIndex indexable value for an object in PluginIndexes.common.UnIndex
- LP #143533: Instead of showing "0.0.0.0" as server name when no - LP #143533: Instead of showing "0.0.0.0" as the SERVER_NAME
specific listening IP is configured for the HTTP server, do a request variable when no specific listening IP is configured for
socket lookup to show the current server's fully qualified name. 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, - LP #143722: Added missing permission to ObjectManager.manage_hasId,
which prevented renaming files and folders via FTP. which prevented renaming files and folders via FTP.
......
...@@ -185,7 +185,7 @@ class zhttp_handler: ...@@ -185,7 +185,7 @@ class zhttp_handler:
env = {} env = {}
env['REQUEST_METHOD']=request.command.upper() env['REQUEST_METHOD']=request.command.upper()
env['SERVER_PORT']=str(server.port) 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_SOFTWARE']=server.SERVER_IDENT
env['SERVER_PROTOCOL']="HTTP/"+request.version env['SERVER_PROTOCOL']="HTTP/"+request.version
env['channel.creation_time']=request.channel.creation_time env['channel.creation_time']=request.channel.creation_time
...@@ -447,10 +447,12 @@ class zhttp_server(http_server): ...@@ -447,10 +447,12 @@ class zhttp_server(http_server):
self.shutup=1 self.shutup=1
self.fast_listen = fast_listen self.fast_listen = fast_listen
http_server.__init__(self, ip, port, resolver, logger_object) http_server.__init__(self, ip, port, resolver, logger_object)
if self.server_name == '0.0.0.0': self.request_server_name = self.server_name
# Workaround to set a more descriptive 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: try:
self.server_name = socket.getfqdn() self.request_server_name = socket.getfqdn()
except socket.error: except socket.error:
pass pass
self.shutup=0 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