summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm27
1 files changed, 7 insertions, 20 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 617562f..3c2c3b2 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4585,20 +4585,18 @@ static NSString *Warning_;
[window setValue:cydia_ forKey:@"cydia"];
}
-- (void) _setMoreHeaders:(NSMutableURLRequest *)request {
+- (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]);
+
if (System_ != NULL)
- [request setValue:System_ forHTTPHeaderField:@"X-System"];
+ [copy setValue:System_ forHTTPHeaderField:@"X-System"];
if (Machine_ != NULL)
- [request setValue:[NSString stringWithUTF8String:Machine_] forHTTPHeaderField:@"X-Machine"];
+ [copy setValue:[NSString stringWithUTF8String:Machine_] forHTTPHeaderField:@"X-Machine"];
if (Token_ != nil)
- [request setValue:Token_ forHTTPHeaderField:@"X-Cydia-Token"];
+ [copy setValue:Token_ forHTTPHeaderField:@"X-Cydia-Token"];
if (Role_ != nil)
- [request setValue:Role_ forHTTPHeaderField:@"X-Role"];
-}
+ [copy setValue:Role_ forHTTPHeaderField:@"X-Role"];
-- (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]);
- [self _setMoreHeaders:copy];
return copy;
}
@@ -6488,17 +6486,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
return [NSURL URLWithString:@"cydia://home"];
}
-- (void) _setMoreHeaders:(NSMutableURLRequest *)request {
- [super _setMoreHeaders:request];
-
- if (ChipID_ != nil)
- [request setValue:ChipID_ forHTTPHeaderField:@"X-Chip-ID"];
- if (UniqueID_ != nil)
- [request setValue:UniqueID_ forHTTPHeaderField:@"X-Unique-ID"];
- if (PLMN_ != nil)
- [request setValue:PLMN_ forHTTPHeaderField:@"X-Carrier-ID"];
-}
-
- (void) aboutButtonClicked {
UIAlertView *alert([[[UIAlertView alloc] init] autorelease]);