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
f614eced
Commit
f614eced
authored
Oct 22, 1999
by
sroberts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated z2.py so that a ZServer can be told to listen for FastCGI requests.
parent
cb85a655
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
4 deletions
+42
-4
ZServer/__init__.py
ZServer/__init__.py
+2
-0
lib/python/ZServer/__init__.py
lib/python/ZServer/__init__.py
+2
-0
z2.py
z2.py
+38
-4
No files found.
ZServer/__init__.py
View file @
f614eced
...
...
@@ -122,6 +122,8 @@ except:
from
medusa
import
resolver
,
logger
,
asyncore
from
HTTPServer
import
zhttp_server
,
zhttp_handler
from
PCGIServer
import
PCGIServer
from
FCGIServer
import
FCGIServer
from
FTPServer
import
FTPServer
from
PubCore
import
setNumberOfThreads
from
medusa.monitor
import
secure_monitor_server
lib/python/ZServer/__init__.py
View file @
f614eced
...
...
@@ -122,6 +122,8 @@ except:
from
medusa
import
resolver
,
logger
,
asyncore
from
HTTPServer
import
zhttp_server
,
zhttp_handler
from
PCGIServer
import
PCGIServer
from
FCGIServer
import
FCGIServer
from
FTPServer
import
FTPServer
from
PubCore
import
setNumberOfThreads
from
medusa.monitor
import
secure_monitor_server
z2.py
View file @
f614eced
...
...
@@ -165,6 +165,13 @@ Options:
%(PCGI_FILE)s, relative to the Zope location. If this is an empty
string (-p '') or the file does not exist, then PCGI is disabled.
-F path_or_port
Either a port number (for inet sockets) or a path name (for unix
domain sockets) for the FastCGI Server. If the flag and value are
not specified then the FastCGI Server is disabled.
-m port
The secure monitor server port. If this is an empty string
...
...
@@ -268,11 +275,16 @@ MODULE='Zope'
# The size of the thread pool, if ZODB3 is used.
NUMBER_OF_THREADS
=
4
# Localization support
LOCALE_ID
=
None
# Socket path or port for the FastCGI Server
FCGI_PORT
=
None
#
########################################################################
...
...
@@ -282,8 +294,9 @@ LOCALE_ID=None
try
:
if
string
.
split
(
sys
.
version
)[
0
]
<
'1.5.2'
:
raise
'Invalid python version'
,
string
.
split
(
sys
.
version
)[
0
]
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hz:Z:t:a:d:u:w:f:p:m:Sl:2DP:rL:'
)
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hz:Z:t:a:d:u:w:f:p:m:Sl:2DP:rF:L:'
)
DEBUG
=
0
READ_ONLY
=
0
...
...
@@ -351,6 +364,8 @@ try:
elif
o
==
'-L'
:
if
v
:
LOCALE_ID
=
v
else
:
LOCALE_ID
=
''
elif
o
==
'-F'
:
FCGI_PORT
=
v
__builtins__
.
__debug__
=
DEBUG
...
...
@@ -375,6 +390,7 @@ sys.path=[os.path.join(here,'lib','python'),here
]
+
filter
(
None
,
sys
.
path
)
# Try to set the locale if specified on the command
# line. If the locale module is not available or the
# requested locale is not supported by the local
...
...
@@ -403,7 +419,6 @@ if LOCALE_ID is not None:
set_locale
(
LOCALE_ID
)
# from this point forward we can use the zope logger
# Import ZServer before we open the database or get at interesting
...
...
@@ -450,7 +465,9 @@ if MODULE=='Zope':
setNumberOfThreads
(
NUMBER_OF_THREADS
)
from
ZServer
import
resolver
,
logger
,
asyncore
from
ZServer
import
zhttp_server
,
zhttp_handler
,
PCGIServer
,
FTPServer
from
ZServer
import
zhttp_server
,
zhttp_handler
,
PCGIServer
,
FTPServer
,
FCGIServer
from
ZServer
import
secure_monitor_server
## ZServer startup
...
...
@@ -508,6 +525,23 @@ if PCGI_FILE and not READ_ONLY:
resolver
=
rs
,
logger_object
=
lg
)
# FastCGI Server
if
FCGI_PORT
and
not
READ_ONLY
:
fcgiPort
=
None
fcgiPath
=
None
try
:
fcgiPort
=
string
.
atoi
(
FCGI_PORT
)
except
ValueError
:
fcgiPath
=
FCGI_PORT
zfcgi
=
FCGIServer
(
module
=
MODULE
,
ip
=
IP_ADDRESS
,
port
=
fcgiPort
,
socket_file
=
fcgiPath
,
resolver
=
rs
,
logger_object
=
lg
)
# Monitor Server
if
MONITOR_PORT
:
from
AccessControl.User
import
super
...
...
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