Monotone-Parent: 3edbc90046db007b2cea7d85505ba6bcecec6dd7

Monotone-Revision: 99eb9661017e4e4371b678e9d5c89d54eb0762c5

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-07-04T18:22:06
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-07-04 18:22:06 +00:00
parent acfedae126
commit be3a423e9b
4 changed files with 49 additions and 30 deletions
+27 -15
View File
@@ -771,30 +771,42 @@ static NSDictionary *reportMap = nil;
return [NSString stringWithFormat: @"%@:", command];
}
- (id) POSTAction: (id) localContext
- (id) davPOSTRequest: (WORequest *) request
withContentType: (NSString *) cType
inContext: (WOContext *) localContext
{
id obj;
NSString *cType, *command;
id <DOMDocument> document;
SEL commandSel;
WORequest *rq;
NSString *command;
obj = nil;
if ([cType hasPrefix: @"application/xml"]
|| [cType hasPrefix: @"text/xml"])
{
document = [request contentAsDOMDocument];
command = [[self _parseXMLCommand: document] davMethodToObjC];
commandSel = NSSelectorFromString (command);
if ([self respondsToSelector: commandSel])
obj = [self performSelector: commandSel withObject: localContext];
}
return obj;
}
- (id) POSTAction: (id) localContext
{
WORequest *rq;
id obj;
rq = [localContext request];
if ([rq isSoWebDAVRequest])
{
cType = [rq headerForKey: @"content-type"];
if ([cType hasPrefix: @"application/xml"]
|| [cType hasPrefix: @"text/xml"])
{
document = [rq contentAsDOMDocument];
command = [[self _parseXMLCommand: document] davMethodToObjC];
commandSel = NSSelectorFromString (command);
if ([self respondsToSelector: commandSel])
obj = [self performSelector: commandSel withObject: localContext];
}
}
obj = [self davPOSTRequest: rq
withContentType: [rq headerForKey: @"content-type"]
inContext: localContext];
else
obj = nil;
return obj;
}