[Zope3-checkins] CVS: Zope3/src/zope/app/http/exception - configure.zcml:1.3 notfound.py:1.3

Sidnei da Silva sidnei@x3ng.com.br
Mon, 23 Jun 2003 13:17:36 -0400


Update of /cvs-repository/Zope3/src/zope/app/http/exception
In directory cvs.zope.org:/tmp/cvs-serv14183/src/zope/app/http/exception

Modified Files:
	configure.zcml notfound.py 
Log Message:
1. Whitespace cleanup. 2. Docstring fixing. 3. Modified DAV code and tests to append '/' to the path if the last element is 'dir-like'. 4. Support for MKCOL with tests + functional tests. 5. Refactored DAV functional tests into a base class for reusing

=== Zope3/src/zope/app/http/exception/configure.zcml 1.2 => 1.3 ===
--- Zope3/src/zope/app/http/exception/configure.zcml:1.2	Wed Apr  2 15:37:43 2003
+++ Zope3/src/zope/app/http/exception/configure.zcml	Mon Jun 23 13:17:05 2003
@@ -1,15 +1,15 @@
 <zopeConfigure xmlns="http://namespaces.zope.org/zope">
 
-<defaultView 
-    for="zope.exceptions.IUnauthorized"	
+<defaultView
+    for="zope.exceptions.IUnauthorized"
     type="zope.publisher.interfaces.http.IHTTPPresentation"
     name="index.html"
     permission="zope.Public"
     factory=".unauthorized.Unauthorized"
     />
 
-<defaultView 
-    for="zope.exceptions.INotFoundError"	
+<defaultView
+    for="zope.exceptions.INotFoundError"
     type="zope.publisher.interfaces.http.IHTTPPresentation"
     name="index.html"
     permission="zope.Public"


=== Zope3/src/zope/app/http/exception/notfound.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/http/exception/notfound.py:1.2	Fri Jun  6 16:55:09 2003
+++ Zope3/src/zope/app/http/exception/notfound.py	Mon Jun 23 13:17:05 2003
@@ -29,7 +29,11 @@
         self.request = request
 
     def __call__(self):
-        self.request.response.setStatus(404)
+        if self.request.method in ['MKCOL'] and self.request.getTraversalStack():
+            # MKCOL with non-existing parent.
+            self.request.response.setStatus(409)
+        else:
+            self.request.response.setStatus(404)
         return ''
 
     __str__ = __call__