Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
825c5163
Commit
825c5163
authored
Oct 14, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround for Collector #1507: Zope binds only to 127.0.0.1
instead to all network addresses by default.
parent
1efc4d4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/python/ZServer/datatypes.py
lib/python/ZServer/datatypes.py
+10
-4
No files found.
lib/python/ZServer/datatypes.py
View file @
825c5163
...
...
@@ -28,13 +28,19 @@ def get_default_host_info():
try
:
ip
=
socket
.
gethostbyname
(
hostname
)
except
socket
.
error
:
hostname
=
'
localhost
'
hostname
=
''
ip
=
socket
.
gethostbyname
(
hostname
)
try
:
hostname
=
socket
.
gethostbyaddr
(
ip
)[
0
]
except
socket
.
error
:
hostname
=
ip
## AJ: We change 'localhost' to '' to force Medusa to use
## any network interface instead of using only 127.0.0.1. This is
## a not totally clean solution :-/ See also Collector #1507.
if
'localhost'
in
hostname
.
lower
():
hostname
=
''
_default_host_info
=
hostname
,
ip
return
_default_host_info
...
...
@@ -98,7 +104,7 @@ class HTTPServerFactory(ServerFactory):
handler
.
_force_connection_close
=
self
.
force_connection_close
if
self
.
webdav_source_clients
:
handler
.
set_webdav_source_clients
(
self
.
webdav_source_clients
)
server
=
HTTPServer
.
zhttp_server
(
ip
=
self
.
ip
,
port
=
self
.
port
,
server
=
HTTPServer
.
zhttp_server
(
ip
=
self
.
host
,
port
=
self
.
port
,
resolver
=
self
.
dnsresolver
,
logger_object
=
access_logger
)
server
.
install_handler
(
handler
)
...
...
@@ -125,7 +131,7 @@ class FTPServerFactory(ServerFactory):
def
create
(
self
):
from
ZServer.AccessLogger
import
access_logger
from
ZServer.FTPServer
import
FTPServer
return
FTPServer
(
ip
=
self
.
ip
,
hostname
=
self
.
host
,
port
=
self
.
port
,
return
FTPServer
(
ip
=
self
.
host
,
hostname
=
self
.
host
,
port
=
self
.
port
,
module
=
self
.
module
,
resolver
=
self
.
dnsresolver
,
logger_object
=
access_logger
)
...
...
@@ -163,7 +169,7 @@ class FCGIServerFactory(ServerFactory):
def
create
(
self
):
from
ZServer.AccessLogger
import
access_logger
from
ZServer.FCGIServer
import
FCGIServer
return
FCGIServer
(
ip
=
self
.
ip
,
port
=
self
.
port
,
return
FCGIServer
(
ip
=
self
.
host
,
port
=
self
.
port
,
socket_file
=
self
.
path
,
module
=
self
.
module
,
resolver
=
self
.
dnsresolver
,
logger_object
=
access_logger
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment