summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm12
1 files changed, 9 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index af616c4..6b43a70 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4210,7 +4210,7 @@ static NSMutableSet *Diversions_;
if (false);
else if (selector == @selector(addBridgedHost:))
return @"addBridgedHost";
- else if (selector == @selector(addPipelinedHost:))
+ else if (selector == @selector(addPipelinedHost:scheme:))
return @"addPipelinedHost";
else if (selector == @selector(addTrivialSource:))
return @"addTrivialSource";
@@ -4324,7 +4324,10 @@ static NSMutableSet *Diversions_;
[BridgedHosts_ performSelectorOnMainThread:@selector(addObject:) withObject:host waitUntilDone:NO];
}
-- (void) addPipelinedHost:(NSString *)host {
+- (void) addPipelinedHost:(NSString *)host scheme:(NSString *)scheme {
+ if (scheme != (id) [WebUndefined undefined])
+ host = [NSString stringWithFormat:@"%@:%@", [scheme lowercaseString], host];
+
[PipelinedHosts_ performSelectorOnMainThread:@selector(addObject:) withObject:host waitUntilDone:NO];
}
@@ -10032,9 +10035,12 @@ MSHook(id, NSURLConnection$init$, NSURLConnection *self, SEL _cmd, NSURLRequest
NSURL *url([copy URL]);
NSString *host([url host]);
+ NSString *scheme([[url scheme] lowercaseString]);
+
+ NSString *compound([NSString stringWithFormat:@"%@:%@", scheme, host]);
if ([copy respondsToSelector:@selector(setHTTPShouldUsePipelining:)])
- if ([PipelinedHosts_ containsObject:host])
+ if ([PipelinedHosts_ containsObject:host] || [PipelinedHosts_ containsObject:compound])
[copy setHTTPShouldUsePipelining:YES];
if ((self = _NSURLConnection$init$(self, _cmd, copy, delegate, usesCache, maxContentLength, startImmediately, connectionProperties)) != nil) {