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
7948d099
Commit
7948d099
authored
Apr 03, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport IPv6 changes from trunk
parent
b494f26a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
3 deletions
+34
-3
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
sources.cfg
sources.cfg
+1
-0
src/ZServer/datatypes.py
src/ZServer/datatypes.py
+3
-1
src/ZServer/medusa/http_server.py
src/ZServer/medusa/http_server.py
+10
-2
src/ZServer/tests/test_config.py
src/ZServer/tests/test_config.py
+16
-0
versions.cfg
versions.cfg
+1
-0
No files found.
doc/CHANGES.rst
View file @
7948d099
...
...
@@ -23,6 +23,8 @@ Bugs Fixed
Features Added
++++++++++++++
- Add preliminary IPv6 support to ZServer.
- Updated to Zope Toolkit 1.0.2.
- Updated distributions:
...
...
@@ -31,6 +33,7 @@ Features Added
- Products.BTreeFolder2 = 2.13.3
- Products.ZCatalog = 2.13.8
- python-gettext = 1.1.1
- ZConfig = 2.9.0
2.13.5 (2011-02-23)
-------------------
...
...
sources.cfg
View file @
7948d099
...
...
@@ -22,3 +22,4 @@ tempstorage = svn ^/tempstorage/trunk
zExceptions = svn ^/zExceptions/trunk
ZODB3 = svn ^/ZODB/trunk
ZopeUndo = svn ^/ZopeUndo/trunk
ZConfig = svn ^/ZConfig/trunk
src/ZServer/datatypes.py
View file @
7948d099
...
...
@@ -35,7 +35,9 @@ class ServerFactory:
ip
=
socket
.
gethostbyname
(
defaulthost
)
self
.
_set_default_host
(
defaulthost
,
ip
)
else
:
self
.
ip
=
socket
.
gethostbyname
(
self
.
host
)
address_info
=
socket
.
getaddrinfo
(
self
.
host
,
self
.
port
)
ips
=
[
info
[
4
][
0
]
for
info
in
address_info
]
self
.
ip
=
ips
[
0
]
self
.
dnsresolver
=
dnsresolver
self
.
module
=
module
self
.
cgienv
=
env
...
...
src/ZServer/medusa/http_server.py
View file @
7948d099
...
...
@@ -542,7 +542,12 @@ class http_server (asyncore.dispatcher):
self
.
ip
=
ip
self
.
port
=
port
asyncore
.
dispatcher
.
__init__
(
self
)
self
.
create_socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
if
':'
in
ip
:
socket_type
=
socket
.
AF_INET6
else
:
socket_type
=
socket
.
AF_INET
self
.
create_socket
(
socket_type
,
socket
.
SOCK_STREAM
)
self
.
handlers
=
[]
...
...
@@ -555,7 +560,10 @@ class http_server (asyncore.dispatcher):
# lower this to 5 if your OS complains
self
.
listen
(
1024
)
host
,
port
=
self
.
socket
.
getsockname
()
name
=
self
.
socket
.
getsockname
()
host
=
name
[
0
]
port
=
name
[
1
]
if
not
ip
:
self
.
log_info
(
'Computing default hostname'
,
'warning'
)
try
:
...
...
src/ZServer/tests/test_config.py
View file @
7948d099
...
...
@@ -134,6 +134,22 @@ class ZServerConfigurationTestCase(BaseTest, WarningInterceptor):
self
.
assertEqual
(
server
.
port
,
9381
)
server
.
close
()
def
test_http_over_ipv6
(
self
):
factory
=
self
.
load_factory
(
"""
\
<http-server>
address [::1]:81
</http-server>
"""
)
self
.
assert_
(
isinstance
(
factory
,
ZServer
.
datatypes
.
HTTPServerFactory
))
self
.
assertEqual
(
factory
.
host
,
"::1"
)
self
.
assertEqual
(
factory
.
port
,
81
)
self
.
check_prepare
(
factory
)
server
=
factory
.
create
()
self
.
assertEqual
(
server
.
ip
,
'::1'
)
self
.
assertEqual
(
server
.
port
,
9381
)
server
.
close
()
def
test_http_factory_defaulthost
(
self
):
factory
=
self
.
load_factory
(
"""
\
<http-server>
...
...
versions.cfg
View file @
7948d099
...
...
@@ -35,6 +35,7 @@ manuel = 1.1.1
mechanize = 0.2.3
unittest2 = 0.5.1
python-gettext = 1.1.1
ZConfig = 2.9.0
ZODB3 = 3.10.2
zope.testing = 3.9.4
...
...
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