Skip to content

Commit a098c40

Browse files
committed
workaround _NSCFURLProtocolBridge BUG!!!
1 parent 8896dc9 commit a098c40

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

PBGitXProtocol.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@
1111

1212
@implementation PBGitXProtocol
1313

14+
- (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id <NSURLProtocolClient>)client
15+
{
16+
// work around for NSURLProtocol bug
17+
// note that this leaks!
18+
CFRetain(client);
19+
20+
if (self = [super initWithRequest:request cachedResponse:cachedResponse client:client])
21+
{
22+
}
23+
24+
return self;
25+
}
26+
1427
+ (BOOL) canInitWithRequest:(NSURLRequest *)request
1528
{
1629
return [[[request URL] scheme] isEqualToString:@"GitX"];

0 commit comments

Comments
 (0)