]> git.saurik.com Git - cydia.git/commitdiff
Abstract out requestWithHeaders:.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 22 Mar 2011 01:24:12 +0000 (18:24 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 22 Mar 2011 01:24:12 +0000 (18:24 -0700)
MobileCydia.mm

index 5d902827b378daca0447a3e0d690fd0d6070adef..db14ab388d14dccf951ea5548e18feeb53fef953 100644 (file)
@@ -3935,6 +3935,7 @@ static _H<NSMutableSet> Diversions_;
 }
 
 + (void) addDiversion:(Diversion *)diversion;
++ (NSURLRequest *) requestWithHeaders:(NSURLRequest *)request;
 
 @end
 
@@ -4569,7 +4570,11 @@ static _H<NSMutableSet> Diversions_;
 }
 
 - (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source {
-    NSMutableURLRequest *copy([[super webView:view resource:resource willSendRequest:request redirectResponse:response fromDataSource:source] mutableCopy]);
+    return [CydiaWebViewController requestWithHeaders:[super webView:view resource:resource willSendRequest:request redirectResponse:response fromDataSource:source]];
+}
+
++ (NSURLRequest *) requestWithHeaders:(NSURLRequest *)request {
+    NSMutableURLRequest *copy([request mutableCopy]);
 
     NSURL *url([copy URL]);
     NSString *host([url host]);