mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 08:55:08 +00:00
Monotone-Parent: 1bf1f8309760e932ba1283aea44e9ce3f1137047
Monotone-Revision: f689524b3f038037e97064846ef2c5bb5328aef6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-19T12:48:35 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -901,32 +901,16 @@ SEL SOGoSelectorForPropertySetter (NSString *property)
|
||||
}
|
||||
|
||||
/* etag support */
|
||||
- (NSArray *) parseETagList: (NSString *) list
|
||||
{
|
||||
NSArray *etags;
|
||||
|
||||
- (NSArray *)parseETagList:(NSString *)_c {
|
||||
NSMutableArray *ma;
|
||||
NSArray *etags;
|
||||
unsigned i, count;
|
||||
|
||||
if ([_c length] == 0)
|
||||
return nil;
|
||||
if ([_c isEqualToString:@"*"])
|
||||
return nil;
|
||||
|
||||
etags = [_c componentsSeparatedByString:@","];
|
||||
count = [etags count];
|
||||
ma = [NSMutableArray arrayWithCapacity:count];
|
||||
for (i = 0; i < count; i++) {
|
||||
NSString *etag;
|
||||
|
||||
etag = [[etags objectAtIndex:i] stringByTrimmingSpaces];
|
||||
#if 0 /* this is non-sense, right? */
|
||||
if ([etag hasPrefix:@"\""] && [etag hasSuffix:@"\""])
|
||||
etag = [etag substringWithRange:NSMakeRange(1, [etag length] - 2)];
|
||||
#endif
|
||||
|
||||
if (etag != nil) [ma addObject:etag];
|
||||
}
|
||||
return ma;
|
||||
if (![list length] || [list isEqualToString:@"*"])
|
||||
etags = nil;
|
||||
else
|
||||
etags = [[list componentsSeparatedByString: @","] trimmedComponents];
|
||||
|
||||
return etags;
|
||||
}
|
||||
|
||||
- (NSException *)checkIfMatchCondition:(NSString *)_c inContext:(id)_ctx {
|
||||
|
||||
Reference in New Issue
Block a user