Skip to content

Commit

Permalink
Fixed HTTPS bug (#1805720)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Nov 30, 2007
1 parent 60ad765 commit 66e346e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/NSString+CCMAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ - (NSString *)completeCruiseControlURLForServerType:(CCMServerType)serverType wi
result = [result stringByAppendingString:@"/"];
result = [result stringByAppendingString:completion];
}
if(![result hasPrefix:@"http://"])
if(![result hasPrefix:@"http://"] && ![result hasPrefix:@"https://"])
{
result = [@"http://" stringByAppendingString:result];
}
Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CCMenu 1.0.0

* Improved URL handling in 'add projects' dialog
* Now automatically determines full URL in 'add projects' dialog
* Fixed HTTPS bug (#1805720)


CCMenu 0.9.5
Expand Down
2 changes: 1 addition & 1 deletion Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleVersion</key>
<string>1.0.0d2</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0d2</string>
<string>1.0.0d3</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSMainNibFile</key>
Expand Down
6 changes: 6 additions & 0 deletions Tests/NSString+CCMAdditionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ - (void)testAddsHTTPSchemeWhenCompletingURLs
STAssertEqualObjects(@"http://localhost/cctray.xml", url, @"Should have completed URL.");
}

- (void)testLeavesHTTPSSchemeWhenCompletingURLs
{
NSString *url = [@"https://localhost/cctray.xml" completeCruiseControlURLForServerType:CCMCruiseControlDashboard];
STAssertEqualObjects(@"https://localhost/cctray.xml", url, @"Should have kept HTTPS scheme.");
}

- (void)testCompletesCruiseControlClassicURLs
{
NSString *url = [@"localhost" completeCruiseControlURLForServerType:CCMCruiseControlClassic];
Expand Down

0 comments on commit 66e346e

Please sign in to comment.