summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-12 13:22:53 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-14 05:09:07 -0700
commitc83678e8f52adad8ee379161700b0e9ef802779b (patch)
treee06f87084c11fff4b2bbacb0c1624ae608804bde
parent7bd76e974a80b20e35daf1f3974300267744df71 (diff)
Add X-Cydia-Id.
-rw-r--r--MobileCydia.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index ab251fe..eb33e74 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4608,6 +4608,8 @@ static _H<NSMutableSet> Diversions_;
if ([url isCydiaSecure] && token) {
if (Token_ != nil && [copy valueForHTTPHeaderField:@"X-Cydia-Token"] == nil)
[copy setValue:Token_ forHTTPHeaderField:@"X-Cydia-Token"];
+ if (UniqueID_ != nil && [copy valueForHTTPHeaderField:@"X-Cydia-Id"] == nil)
+ [copy setValue:UniqueID_ forHTTPHeaderField:@"X-Cydia-Id"];
}
return copy;
@@ -8392,8 +8394,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[request setValue:[NSString stringWithUTF8String:Machine_] forHTTPHeaderField:@"X-Machine"];
if ([url isCydiaSecure]) {
- if (UniqueID_ != nil)
+ if (UniqueID_ != nil) {
[request setValue:UniqueID_ forHTTPHeaderField:@"X-Unique-ID"];
+ [request setValue:UniqueID_ forHTTPHeaderField:@"X-Cydia-Id"];
+ }
}
return [[[NSURLConnection alloc] initWithRequest:request delegate:self] autorelease];