if (scheme != (id) [WebUndefined undefined])
host = [NSString stringWithFormat:@"%@:%@", [scheme lowercaseString], host];
if (scheme != (id) [WebUndefined undefined])
host = [NSString stringWithFormat:@"%@:%@", [scheme lowercaseString], host];
- if ([[[url scheme] lowercaseString] isEqualToString:@"https"])
- if ([BridgedHosts_ containsObject:[url host]])
- [window setValue:cydia_ forKey:@"cydia"];
+ @synchronized (HostConfig_) {
+ if ([[[url scheme] lowercaseString] isEqualToString:@"https"])
+ if ([BridgedHosts_ containsObject:[url host]])
+ [window setValue:cydia_ forKey:@"cydia"];
+ }
if ([self respondsToSelector:@selector(setApplicationSupportsShakeToEdit:)])
[self setApplicationSupportsShakeToEdit:NO];
if ([self respondsToSelector:@selector(setApplicationSupportsShakeToEdit:)])
[self setApplicationSupportsShakeToEdit:NO];
- if ([copy respondsToSelector:@selector(setHTTPShouldUsePipelining:)])
- if ([PipelinedHosts_ containsObject:host] || [PipelinedHosts_ containsObject:compound])
- [copy setHTTPShouldUsePipelining:YES];
+ @synchronized (HostConfig_) {
+ if ([copy respondsToSelector:@selector(setHTTPShouldUsePipelining:)])
+ if ([PipelinedHosts_ containsObject:host] || [PipelinedHosts_ containsObject:compound])
+ [copy setHTTPShouldUsePipelining:YES];
+ }
if ((self = _NSURLConnection$init$(self, _cmd, copy, delegate, usesCache, maxContentLength, startImmediately, connectionProperties)) != nil) {
} return self;
if ((self = _NSURLConnection$init$(self, _cmd, copy, delegate, usesCache, maxContentLength, startImmediately, connectionProperties)) != nil) {
} return self;
- BridgedHosts_ = [NSMutableSet setWithCapacity:2];
- PipelinedHosts_ = [NSMutableSet setWithCapacity:2];
+ HostConfig_ = [[NSObject alloc] init];
+ @synchronized (HostConfig_) {
+ BridgedHosts_ = [NSMutableSet setWithCapacity:4];
+ PipelinedHosts_ = [NSMutableSet setWithCapacity:4];
+ }