summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-28 08:37:02 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:27 -0800
commitb8f1a18a5d02d3f08dd2a26115a92ac72a2a3cc4 (patch)
tree2c8abd30e08aeb3f08531bd2f018def324bb48d9
parent7256476b3a9d920ad5ac69cf5a824f810103cb34 (diff)
file:/// needs cydia.* access for error.html.
-rw-r--r--MobileCydia.mm12
1 files changed, 10 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 3e0d16a..a5f5776 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4701,12 +4701,20 @@ static NSMutableSet *Diversions_;
WebDataSource *source([frame dataSource]);
NSURLResponse *response([source response]);
NSURL *url([response URL]);
+ NSString *scheme([[url scheme] lowercaseString]);
+
+ bool bridged(false);
@synchronized (HostConfig_) {
- if ([[[url scheme] lowercaseString] isEqualToString:@"https"])
+ if ([scheme isEqualToString:@"file"])
+ bridged = true;
+ else if ([scheme isEqualToString:@"https"])
if ([BridgedHosts_ containsObject:[url host]])
- [window setValue:cydia_ forKey:@"cydia"];
+ bridged = true;
}
+
+ if (bridged)
+ [window setValue:cydia_ forKey:@"cydia"];
}
- (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source {