mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
Monotone-Parent: d320625490d77dd599853dd7e1b39027126c15f5
Monotone-Revision: c4392a8d8578caf8d80806e5cb77d1c4ee24ccd7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-04T23:28:52 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <DOM/DOMProtocols.h>
|
||||
#import <NGCards/NSDictionary+NGCards.h>
|
||||
#import <UI/SOGoUI/SOGoACLAdvisory.h>
|
||||
|
||||
@@ -646,6 +647,42 @@ static BOOL kontactGroupDAV = YES;
|
||||
return response;
|
||||
}
|
||||
|
||||
- (NSString *) _parseXMLCommand: (id <DOMDocument>) document
|
||||
{
|
||||
NSString *command;
|
||||
|
||||
command = [[document firstChild] nodeName];
|
||||
|
||||
return [NSString stringWithFormat: @"%@:", command];
|
||||
}
|
||||
|
||||
- (id) POSTAction: (id) localContext
|
||||
{
|
||||
id obj;
|
||||
NSString *cType, *command;
|
||||
id <DOMDocument> document;
|
||||
SEL commandSel;
|
||||
WORequest *rq;
|
||||
|
||||
obj = nil;
|
||||
|
||||
rq = [localContext request];
|
||||
if ([rq isSoWebDAVRequest])
|
||||
{
|
||||
cType = [rq headerForKey: @"content-type"];
|
||||
if ([cType isEqualToString: @"application/xml"])
|
||||
{
|
||||
document = [rq contentAsDOMDocument];
|
||||
command = [[self _parseXMLCommand: document] davMethodToObjC];
|
||||
commandSel = NSSelectorFromString (command);
|
||||
if ([self respondsToSelector: commandSel])
|
||||
obj = [self performSelector: commandSel withObject: localContext];
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
- (id) GETAction: (id) localContext
|
||||
{
|
||||
// TODO: I guess this should really be done by SOPE (redirect to
|
||||
|
||||
Reference in New Issue
Block a user