mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 00:45:09 +00:00
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:
+27
-15
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user