diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-21 18:24:12 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-21 18:24:12 -0700 |
commit | 85ae5f425846efc75aadbab17c91b92230aff7a4 (patch) | |
tree | c57a6a31062a62d143896c4a4833e5037986a9f9 /MobileCydia.mm | |
parent | bc1cffbe507dd8e8ad35b4598515d9a75585e5b7 (diff) |
Abstract out requestWithHeaders:.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 5d90282..db14ab3 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -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]); |