Skip to content

Commit e1075d1

Browse files
authored
Merge branch 'main' into fixNonExistingFieldAccess
2 parents 232b933 + 1911514 commit e1075d1

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/MigrationTools.Clients.TfsObjectModel/Tools/TfsEmbededImagesTool.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,7 @@ private string UploadedAndRetrieveAttachmentLinkUrl(string matchedSourceUri, str
132132
{
133133
if (!string.IsNullOrEmpty(sourcePersonalAccessToken))
134134
{
135-
var host = new Uri(matchedSourceUri).Host.ToLowerInvariant();
136-
if (host.Contains("dev.azure.com") || host.Contains("visualstudio.com"))
137-
{
138-
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", sourcePersonalAccessToken);
139-
}
140-
else
141-
{
142-
string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Format("{0}:{1}", "", sourcePersonalAccessToken)));
143-
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);
144-
}
135+
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", sourcePersonalAccessToken);
145136
}
146137

147138
var result = DownloadFile(httpClient, matchedSourceUri, fullImageFilePath);

0 commit comments

Comments
 (0)