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
70b5d923
Commit
70b5d923
authored
Aug 07, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move new Zope2.startup.config module into ZServer.
parent
33f72dcb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
39 deletions
+33
-39
CHANGES.rst
CHANGES.rst
+1
-1
src/Testing/ZopeTestCase/threadutils.py
src/Testing/ZopeTestCase/threadutils.py
+1
-1
src/ZPublisher/HTTPResponse.py
src/ZPublisher/HTTPResponse.py
+5
-2
src/Zope2/Startup/config.py
src/Zope2/Startup/config.py
+0
-30
src/Zope2/Startup/handlers.py
src/Zope2/Startup/handlers.py
+26
-5
No files found.
CHANGES.rst
View file @
70b5d923
...
...
@@ -42,7 +42,7 @@ Restructuring
- Split a WSGI part out of `Zope2.Startup.ZopeStarter`.
- Add new `Zope2.Startup.config` module to hold configuration.
- Add new `Z
Server.Z
ope2.Startup.config` module to hold configuration.
- Remove `Control_Panel` `/DebugInfo` and `/DavLocks`.
...
...
src/Testing/ZopeTestCase/threadutils.py
View file @
70b5d923
...
...
@@ -23,7 +23,7 @@ dummyLOG = StringIO()
def
setNumberOfThreads
(
number_of_threads
):
'''Sets number of ZServer threads.'''
try
:
from
Zope2.Startup.config
import
setNumberOfThreads
from
Z
Server.Z
ope2.Startup.config
import
setNumberOfThreads
setNumberOfThreads
(
number_of_threads
)
except
ImportError
:
pass
...
...
src/ZPublisher/HTTPResponse.py
View file @
70b5d923
...
...
@@ -564,9 +564,12 @@ class HTTPResponse(BaseResponse):
""" Request that the server shut down with exitCode after fulfilling
the current request.
"""
from
Zope2.Startup
import
config
config
.
ZSERVER_EXIT_CODE
=
exitCode
self
.
_shutdown_flag
=
1
try
:
from
ZServer.Zope2.Startup
import
config
config
.
ZSERVER_EXIT_CODE
=
exitCode
except
ImportError
:
pass
def
_shutdownRequested
(
self
):
""" Returns true if this request requested a server shutdown.
...
...
src/Zope2/Startup/config.py
deleted
100644 → 0
View file @
33f72dcb
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
TRUSTED_PROXIES
=
[]
ZSERVER_CONNECTION_LIMIT
=
1000
ZSERVER_ENABLE_MS_PUBLIC_HEADER
=
False
ZSERVER_EXIT_CODE
=
0
ZSERVER_LARGE_FILE_THRESHOLD
=
524288
ZSERVER_THREADS
=
1
def
setNumberOfThreads
(
n
):
"""This function will self-destruct in 4 statements.
"""
global
ZSERVER_THREADS
ZSERVER_THREADS
=
n
global
setNumberOfThreads
del
setNumberOfThreads
src/Zope2/Startup/handlers.py
View file @
70b5d923
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
os
import
re
import
sys
from
socket
import
gethostbyaddr
from
Zope2.Startup
import
config
try
:
from
ZServer.Zope2.Startup
import
config
except
ImportError
:
config
=
None
def
_setenv
(
name
,
value
):
...
...
@@ -57,7 +74,8 @@ def session_timeout_minutes(value):
def
large_file_threshold
(
value
):
config
.
ZSERVER_LARGE_FILE_THRESHOLD
=
value
if
config
:
config
.
ZSERVER_LARGE_FILE_THRESHOLD
=
value
def
http_realm
(
value
):
...
...
@@ -66,7 +84,8 @@ def http_realm(value):
def
max_listen_sockets
(
value
):
config
.
ZSERVER_CONNECTION_LIMIT
=
value
if
config
:
config
.
ZSERVER_CONNECTION_LIMIT
=
value
def
cgi_maxlen
(
value
):
...
...
@@ -79,7 +98,8 @@ def http_header_max_length(value):
def
enable_ms_public_header
(
value
):
config
.
ZSERVER_ENABLE_MS_PUBLIC_HEADER
=
value
if
config
:
config
.
ZSERVER_ENABLE_MS_PUBLIC_HEADER
=
value
def
root_handler
(
cfg
):
...
...
@@ -131,7 +151,8 @@ def root_handler(cfg):
mapped
=
[]
for
name
in
cfg
.
trusted_proxies
:
mapped
.
extend
(
_name_to_ips
(
name
))
config
.
TRUSTED_PROXIES
=
tuple
(
mapped
)
if
config
:
config
.
TRUSTED_PROXIES
=
tuple
(
mapped
)
from
ZPublisher
import
HTTPRequest
HTTPRequest
.
trusted_proxies
=
tuple
(
mapped
)
...
...
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