[ZPT] Page Templates in WebDAV arrive as rendered HTML
Evan Simpson
evan@zope.com
Thu, 23 Aug 2001 10:28:35 -0400
zope@meadowbase.com wrote:
> I installed WebIFS, a Win32 WebDAV client that makes DAV
> content look like another drive in the file system. When I pull down a
> Page Template object to edit it, I get the final HTML, not the page
> template text itself.
Most (all?) WebDAV clients don't take dynamic pages into account, and
send a simple HTTP GET to load them. This gets you the rendered HTML.
The z2.py start script has a "-W <port#>" argument that you can use to
set up a WebDAV source port. For instance, if you add "-W 9800", Zope
will send page source in response to GET requests on port #9800.
You should only use WebDAV with a source port.
Also, there's an issue to beware of when using a "make WebDAV server
look like a mapped drive" products such as WebDrive and WebIFS. Since
web page editors think that they are editing a local file, they will
often perform operations that work well with a filesystem but screw up
an object database. For instance, when Dreamweaver saves changes, it
will create a temporary file, rename the original file, rename the
temporary file into place, then delete the original file. This destroys
all properties, history, and security settings of the page.
Cheers,
Evan @ Zope