Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#847] DefaultRequestHeaders can not be null or empty #848

Merged
merged 27 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7d79160
init bruno
RayWangQvQ Jan 1, 2025
e67520a
Update change log
RayWangQvQ Jan 1, 2025
2258697
Update VIP task's receive logic
RayWangQvQ Jan 1, 2025
39ba661
Add ogvwatchnew APIs
RayWangQvQ Jan 1, 2025
e8f538b
update bruno scripts
RayWangQvQ Jan 2, 2025
bfd05d6
update bruno scripts
RayWangQvQ Jan 4, 2025
9e08fc7
init VIP big point ogv watch API
RayWangQvQ Jan 4, 2025
2bdb07c
update consts
RayWangQvQ Jan 23, 2025
66c56b6
remove codes that did not pass test
RayWangQvQ Jan 23, 2025
e22a738
Merge pull request #821 from RayWangQvQ/feature/817
RayWangQvQ Jan 23, 2025
c948d8b
upgrade pkgs
RayWangQvQ Jan 23, 2025
9fff829
upgrade to dotnet 8
RayWangQvQ Jan 23, 2025
db27621
migrate in docker
RayWangQvQ Jan 23, 2025
25a69d0
updatge change log
RayWangQvQ Jan 23, 2025
c827dde
update 8.0 in qinglong scripts
RayWangQvQ Feb 15, 2025
1a30103
update other 6.0 in actions or docs
RayWangQvQ Feb 15, 2025
514ccbe
Merge pull request #830 from RayWangQvQ/feature/829
RayWangQvQ Feb 15, 2025
cc3b11d
remove --no-cdn since its obsolute
RayWangQvQ Feb 15, 2025
f027176
remove return when install
RayWangQvQ Feb 15, 2025
3728440
fix[#824]: log cookie when qinglong save env fail
RayWangQvQ Feb 16, 2025
67e6b4e
update change log
RayWangQvQ Feb 16, 2025
ad4d8c9
Merge pull request #841 from RayWangQvQ/fix/824-qinglong-removed-auth…
RayWangQvQ Feb 16, 2025
2388e37
Set DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 in qinglong
RayWangQvQ Feb 16, 2025
fa8383b
Merge branch 'main' into develop
RayWangQvQ Feb 22, 2025
41dfc00
fix[#847]: DefaultRequestHeaders can not be null or empty
RayWangQvQ Feb 22, 2025
2eb188f
update change log
RayWangQvQ Feb 22, 2025
d56aa91
Merge branch 'main' into develop
RayWangQvQ Feb 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 2.2.1
-Fix[#847]: DefaultRequestHeaders can not be null or empty with dotnet 8
## 2.2.0
- Migrate from dotnet 6.0 to dotnet 8.0
- Add Bruno to document the APIs
Expand Down
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Authors>Ray</Authors>
<Version>2.2.0</Version>
<Version>2.2.1</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ public static IServiceCollection AddBiliBiliClientApi(this IServiceCollection se
//bilibli
Action<IServiceProvider, HttpClient> config = (sp, c) => {
c.DefaultRequestHeaders.Add("User-Agent", sp.GetRequiredService<IOptionsMonitor<SecurityOptions>>().CurrentValue.UserAgent);
c.DefaultRequestHeaders.Add("Cookie", sp.GetRequiredService<BiliCookie>().ToString());
var ck = sp.GetRequiredService<BiliCookie>().ToString();
if(!string.IsNullOrWhiteSpace(ck)) c.DefaultRequestHeaders.Add("Cookie", ck);
};
Action<IServiceProvider, HttpClient> configApp = (sp, c) => {
c.DefaultRequestHeaders.Add("User-Agent", sp.GetRequiredService<IOptionsMonitor<SecurityOptions>>().CurrentValue.UserAgentApp);
c.DefaultRequestHeaders.Add("Cookie", sp.GetRequiredService<BiliCookie>().ToString());
var ck = sp.GetRequiredService<BiliCookie>().ToString();
if(!string.IsNullOrWhiteSpace(ck)) c.DefaultRequestHeaders.Add("Cookie", ck);
};

services.AddBiliBiliClientApi<IUserInfoApi>(BiliHosts.Api, config);
Expand Down
Loading