Browse Source

Merge pull request #539 from ionite34/fix-civitai-login

Fix civitai login dialog not showing when needed
pull/495/head
JT 9 months ago committed by GitHub
parent
commit
7e63065df5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 7
      StabilityMatrix.Core/Services/DownloadService.cs

1
CHANGELOG.md

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
- (Internal) Updated to Avalonia 11.0.9
### Fixed
- Fixed image viewer dialog arrow key navigation not working
- Fixed CivitAI login prompt not showing when downloading models that require CivitAI logins
## v2.9.0-pre.1
### Added

7
StabilityMatrix.Core/Services/DownloadService.cs

@ -1,4 +1,5 @@
using System.Net.Http.Headers;
using System.Net;
using System.Net.Http.Headers;
using Microsoft.Extensions.Logging;
using Polly.Contrib.WaitAndRetry;
using StabilityMatrix.Core.Attributes;
@ -184,6 +185,10 @@ public class DownloadService : IDownloadService
throw new UnauthorizedAccessException();
}
}
else if (noRedirectResponse.StatusCode == HttpStatusCode.Unauthorized)
{
throw new UnauthorizedAccessException();
}
using var redirectRequest = new HttpRequestMessage();
redirectRequest.Method = HttpMethod.Get;

Loading…
Cancel
Save