From 9441e8b7eefb6ed7df2fc039e49a4fdea60aa1b0 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 6 Oct 2005 10:53:43 +0000 Subject: [PATCH] work on REPORT git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1163 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 5 ++++ sope-appserver/NGObjWeb/Version | 2 +- .../WebDAV/SoObjectWebDAVDispatcher.m | 23 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index f5e8b5a8..0599addd 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2005-10-06 Helge Hess + + * WebDAV/SoObjectWebDAVDispatcher.m: decode XML content of REPORT + requests (v4.5.208) + 2005-10-05 Helge Hess * DynamicElements/WOCompoundElement.m: setup defaults in +initialize diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 65b1a9f8..b3a4b99d 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=207 +SUBMINOR_VERSION:=208 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 diff --git a/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m b/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m index 733cb29f..1bf37608 100644 --- a/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m +++ b/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m @@ -1472,6 +1472,29 @@ static NSTimeZone *gmt = nil; /* DAV reports */ - (id)doREPORT:(WOContext *)_ctx { + WORequest *rq; + id domDocument; + + rq = [_ctx request]; + + /* ensure XML */ + + if (![[rq headerForKey:@"content-type"] hasPrefix:@"text/xml"]) { + return [self httpException:400 /* invalid request */ + reason:@"XML entity expected for WebDAV REPORT."]; + } + + /* retrieve XML */ + + if ((domDocument = [rq contentAsDOMDocument]) == nil) { + return [self httpException:400 /* invalid request */ + reason:@"Could not parse XML of WebDAV REPORT."]; + } + + /* process DOM */ + + [self logWithFormat:@"TODO: process REPORT: %@", domDocument]; + return [self httpException:405 /* method not allowed */ reason:@"WebDAV reports not yet implemented."]; } -- 2.39.5