Commit a62d0bd1 authored by Amos Latteier's avatar Amos Latteier

Made enivorment variable settings work with the http server. So now you can do...

Made enivorment variable settings work with the http server. So now you can do things like ./z2.py -w 8888 SCRIPT_NAME=Zope and actually have the specified SCRIPT_NAME override the normal SCRIPT_NAME. Useful for keeping ZServer behind a proxy.
parent 918e1457
......@@ -199,6 +199,10 @@ UID='nobody'
# Port for HTTP Server. The standard port for HTTP services is 80.
HTTP_PORT=9673
# HTTP enivornment settings.
HTTP_ENV={}
## FTP configuration
# Port for the FTP Server. The standard port for FTP services is 21.
......@@ -237,7 +241,9 @@ try:
a=string.split(a,'=')
o=a[0]
v=string.join(a[1:],'=')
if o: os.environ[o]=v
if o:
os.environ[o]=v
HTTP_ENV[o]=v
else:
raise 'Invalid argument', a
......@@ -349,7 +355,7 @@ if HTTP_PORT:
# from another web server to ZServer, and would like the CGI
# environment to reflect the CGI environment of the other web
# server.
zh = zhttp_handler(MODULE, '')
zh = zhttp_handler(MODULE, '', HTTP_ENV)
hs.install_handler(zh)
......
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