From 85ae5f425846efc75aadbab17c91b92230aff7a4 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 21 Mar 2011 18:24:12 -0700 Subject: Abstract out requestWithHeaders:. --- MobileCydia.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 5d90282..db14ab3 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -3935,6 +3935,7 @@ static _H Diversions_; } + (void) addDiversion:(Diversion *)diversion; ++ (NSURLRequest *) requestWithHeaders:(NSURLRequest *)request; @end @@ -4569,7 +4570,11 @@ static _H 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]); -- cgit v1.2.3