Permalink
Browse files

Fixed GitX URL scheme problem (On Lion it always comes back as 'gitx').

  • Loading branch information...
1 parent 59701cb commit ff833ea880ce8ca29218aa6051261ef147b53b8c @roustem roustem committed May 27, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 PBGitXProtocol.m
  2. +2 −1 PBWebController.m
View
@@ -26,7 +26,7 @@ - (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLRespons
+ (BOOL) canInitWithRequest:(NSURLRequest *)request
{
- return [[[request URL] scheme] isEqualToString:@"GitX"];
+ return [[[[request URL] scheme] lowercaseString] isEqualToString:@"gitx"];
}
+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
View
@@ -93,7 +93,8 @@ - (NSURLRequest *)webView:(WebView *)sender
return request;
// TODO: Change this to canInitWithRequest
- if ([[[request URL] scheme] isEqualToString:@"GitX"]) {
+ NSString *scheme = [[[request URL] scheme] lowercaseString];
+ if ([scheme isEqualToString:@"gitx"]) {
NSMutableURLRequest *newRequest = [request mutableCopy];
[newRequest setRepository:self.repository];
return newRequest;

0 comments on commit ff833ea

Please sign in to comment.