[Zope3-dev] WebDav and Dreamweaver

Paolo Invernizzi arathorn at fastwebnet.it
Thu May 6 03:42:37 EDT 2004


Having seen the word 'Dreamweaver' in the Siesia thread, I started 
playing with it...

Webdav is not working... propfind fails reporting error 400.

The problem is that in zope.app.dav.propfind the PROPFIND class is 
expecting a request.header content-type like this:

53 if self.content_type.lower() not in ['text/xml', 'application/xml']:
54     request.response.setStatus(400)
55     return body

while dreamweaver send this:

self.request.items()
[ ('CONNECTION_TYPE', 'Close'),
   ('CONTENT_TYPE', 'text/xml; charset="utf-8"'),   <<<<<< UUUGGGHHHH
   ('SERVER_SOFTWARE', 'zope.server.http (HTTP)'),
   ('SCRIPT_NAME', ''),
   ('REQUEST_METHOD', 'PROPFIND'),
   ('HTTP_HOST', 'localhost'),
   ('PATH_INFO', '/p/'),
   ('SERVER_PROTOCOL', 'HTTP/1.1'),
   ('CHANNEL_CREATION_TIME', 1083790640.0780001),
   ('CONTENT_LENGTH', '130'),
   ('HTTP_TRANSLATE', 'f'),
   ('HTTP_USER_AGENT', 'Dreamweaver-WebDAV-SCM1.02'),
   ('SERVER_NAME', 'angband'),
   ('GATEWAY_INTERFACE', 'CGI/1.1'),
   ('REMOTE_ADDR', '127.0.0.1'),
   ('HTTP_DEPTH', '1'),
   ('SERVER_PORT', '80') ]

I've fixed it inserting in the __init__ of the PROPFIND class something 
like this:

if ';' in self.content_type:
     self.content_type = self.content_type.split(';')[0]

and webdav resurrected.

I have zero knowledge in this field, so I donno what the standard says 
for CONTENT_TYPE... so I've not filed a bug/patch in the collector...

---
Paolo Invernizzi




More information about the Zope3-dev mailing list