mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 04:20:33 +00:00
Fixed MailDAV support
Monotone-Parent: 1408266cca94d58c7a555af2e7697e3db2b49cf0 Monotone-Revision: 2b4b283c7442a1f2231c8b06c202bee21abeb77e Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-28T21:42:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
|
||||
- (NSString *) doubleQuotedString;
|
||||
|
||||
- (NSString *) stringByEscapingURLPart;
|
||||
|
||||
- (NSString *) jsonRepresentation;
|
||||
|
||||
- (NSString *) asCSSIdentifier;
|
||||
|
||||
@@ -304,6 +304,19 @@ static NSMutableCharacterSet *urlStartChars = nil;
|
||||
return [self doubleQuotedString];
|
||||
}
|
||||
|
||||
- (NSString *) stringByEscapingURLPart
|
||||
{
|
||||
NSString *rc;
|
||||
|
||||
rc = [self stringByUnescapingURL];
|
||||
rc = [rc stringByReplacingString: @"@"
|
||||
withString: @"%40"];
|
||||
rc = [rc stringByReplacingString: @" "
|
||||
withString: @"%20"];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (NSString *) asCSSIdentifier
|
||||
{
|
||||
NSMutableString *cssIdentifier;
|
||||
|
||||
@@ -1143,11 +1143,12 @@ SEL SOGoSelectorForPropertySetter (NSString *property)
|
||||
{
|
||||
NSURL *serverURL, *url;
|
||||
NSMutableArray *path;
|
||||
NSString *baseURL, *urlMethod, *fullHost;
|
||||
NSString *baseURL, *urlMethod, *fullHost, *part;
|
||||
NSNumber *port;
|
||||
int count, max;
|
||||
|
||||
serverURL = [context serverURL];
|
||||
baseURL = [[self baseURLInContext: context] stringByUnescapingURL];
|
||||
baseURL = [self baseURLInContext: context];
|
||||
path = [NSMutableArray arrayWithArray: [baseURL componentsSeparatedByString:
|
||||
@"/"]];
|
||||
if ([baseURL hasPrefix: @"http"])
|
||||
@@ -1165,6 +1166,14 @@ SEL SOGoSelectorForPropertySetter (NSString *property)
|
||||
[path insertObject: expected atIndex: 2];
|
||||
}
|
||||
|
||||
max = [path count];
|
||||
for (count = 3; count < max; count++)
|
||||
{
|
||||
part = [path objectAtIndex: count];
|
||||
[path replaceObjectAtIndex: count
|
||||
withObject: [part stringByEscapingURLPart]];
|
||||
}
|
||||
|
||||
port = [serverURL port];
|
||||
if (port)
|
||||
fullHost = [NSString stringWithFormat: @"%@:%@",
|
||||
|
||||
Reference in New Issue
Block a user