[Zope-Checkins] CVS: Zope - z2.py:1.55.30.1
Andreas Jung
andreas@zope.com
Mon, 5 Nov 2001 10:07:58 -0500
Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv5318
Modified Files:
Tag: ajung-webdav-debug
z2.py
Log Message:
added -g switch to enable webdav magic
=== Zope/z2.py 1.55 => 1.55.30.1 ===
- The end of the request.
+ -g
+
+ Enable WebDAV content-type changing magic.
+
Environment settings are of the form: NAME=VALUE.
Note: you *must* use Python 2.1 or later!
@@ -374,6 +378,9 @@
# Detailed log file
DETAILED_LOG_FILE=''
+# Enable WEBDAV content-type changing magic
+WEBDAV_MAGIC_ENABLED=None
+
#
########################################################################
@@ -409,7 +416,7 @@
raise 'Invalid python version', string.split(sys.version)[0]
opts, args = getopt.getopt(sys.argv[1:],
- 'hz:Z:t:i:a:d:u:w:W:f:p:m:Sl:2DP:rF:L:XM:')
+ 'hz:Z:t:i:a:d:u:w:W:f:p:m:Sl:2DP:rF:L:XM:g')
DEBUG=0
READ_ONLY=0
@@ -481,6 +488,7 @@
if v=='-': v=''
FCGI_PORT=v
elif o=='-M': DETAILED_LOG_FILE=v
+ elif o=='-g': WEBDAV_MAGIC_ENABLED = 1
except SystemExit: sys.exit(0)
except:
@@ -642,6 +650,12 @@
# WebDAV source Server (runs HTTP, but munges request to return
# 'manage_FTPget').
+
+ if WEBDAV_MAGIC_ENABLED:
+ from webdav import Resource
+ print "enabled"
+ Resource.webdav_magic_enabled = 1
+
if WEBDAV_SOURCE_PORT:
if type(WEBDAV_SOURCE_PORT) is type(0):
WEBDAV_SOURCE_PORT=((IP_ADDRESS, WEBDAV_SOURCE_PORT),)