NSURLResponse *response([source response]);
NSURL *url([response URL]);
- //NSString *scheme([url scheme]);
+
+ NSString *scheme([[url scheme] lowercaseString]);
NSString *host([url host]);
if ([response isKindOfClass:[NSHTTPURLResponse class]]) {
[self setHeaders:headers forHost:host];
}
- if ([CydiaHosts_ containsObject:host])
- [window setValue:cydia_ forKey:@"cydia"];
+ if ([scheme isEqualToString:@"https"])
+ if ([CydiaHosts_ containsObject:host])
+ [window setValue:cydia_ forKey:@"cydia"];
}
- (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source {