diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-21 18:20:36 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-21 18:20:36 -0700 |
commit | bc1cffbe507dd8e8ad35b4598515d9a75585e5b7 (patch) | |
tree | 448bfe309b8ccafd5ed04da6a8d915b6454217ec | |
parent | 68bd7c60c69be8fbf1d8a5ef7dc8ca62883351a5 (diff) |
Use modified URL during willSendRequest:.
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index d8f39d7..5d90282 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4569,11 +4569,11 @@ static _H<NSMutableSet> Diversions_; } - (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source { - NSURL *url([request URL]); - NSString *host([url host]); - NSMutableURLRequest *copy([[super webView:view resource:resource willSendRequest:request redirectResponse:response fromDataSource:source] mutableCopy]); + NSURL *url([copy URL]); + NSString *host([url host]); + if ([copy valueForHTTPHeaderField:@"X-Cydia-Cf-Version"] == nil) [copy setValue:[NSString stringWithFormat:@"%.2f", kCFCoreFoundationVersionNumber] forHTTPHeaderField:@"X-Cydia-Cf-Version"]; if (Machine_ != NULL && [copy valueForHTTPHeaderField:@"X-Machine"] == nil) |