Skip to content

Commit

Permalink
Merge pull request #9 from davidebbo/FixSlashIssue
Browse files Browse the repository at this point in the history
Append trailing slash to service URL if needed
  • Loading branch information
davidfowl committed Jul 8, 2011
2 parents accf4f1 + 8cfb3df commit e5ad711
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Kudu.Core/SourceControl/RemoteRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ public class RemoteRepository : IRepository {
private readonly HttpClient _client;

public RemoteRepository(string serviceUrl) {
// The URL needs to end with a slash for HttpClient to do the right thing with relative paths
if (!serviceUrl.EndsWith("/")) {
serviceUrl += "/";
}

_client = new HttpClient(serviceUrl);
}

Expand Down

0 comments on commit e5ad711

Please sign in to comment.