Skip to content

fix header compatibility and bump version #241

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

Merged
merged 2 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
**2022-10-26**

v8.3.0

移除:不推荐域名

增加:亚太-首尔 和 华东-浙江2 固定区域

增加:设置存储对象的生命周期 API

优化:分片上传 ctx 超时检测

修复:部分运行环境 Content-Type 请求头不兼容问题(v8.2.0 引入)

修复:分片上传 v2 不允许没有 key 的问题

**2022-06-9**

v8.2.0
Expand Down
15 changes: 12 additions & 3 deletions src/Qiniu/Http/HttpManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ public HttpResult Get(string url, StringDictionary headers, string token, bool b
{
foreach (string fieldName in headers.Keys)
{
wReq.Headers.Add(fieldName, headers[fieldName]);
if (!WebHeaderCollection.IsRestricted(fieldName))
{
wReq.Headers.Add(fieldName, headers[fieldName]);
}
}

if (headers.ContainsKey("Content-Type"))
Expand Down Expand Up @@ -264,7 +267,10 @@ public HttpResult Post(string url, StringDictionary headers, string token, bool
{
foreach (string fieldName in headers.Keys)
{
wReq.Headers.Add(fieldName, headers[fieldName]);
if (!WebHeaderCollection.IsRestricted(fieldName))
{
wReq.Headers.Add(fieldName, headers[fieldName]);
}
}

if (headers.ContainsKey("Content-Type"))
Expand Down Expand Up @@ -1125,7 +1131,10 @@ public HttpResult PostForm(string url, StringDictionary headers, byte[] data, st
{
foreach (string fieldName in headers.Keys)
{
wReq.Headers.Add(fieldName, headers[fieldName]);
if (!WebHeaderCollection.IsRestricted(fieldName))
{
wReq.Headers.Add(fieldName, headers[fieldName]);
}
}
}
if (!string.IsNullOrEmpty(token))
Expand Down
2 changes: 1 addition & 1 deletion src/Qiniu/Qiniu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PostBuildEvent>
</PostBuildEvent>
<ProjectId>Qiniu</ProjectId>
<Version>8.2.0</Version>
<Version>8.3.0</Version>
<Authors>Rong Zhou, Qiniu SDK</Authors>
<Company>Shanghai Qiniu Information Technology Co., Ltd.</Company>
<Description>Qiniu Resource (Cloud) Storage SDK for C#</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/Qiniu/QiniuCSharpSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public class QiniuCSharpSDK
/// <summary>
/// SDK版本号
/// </summary>
public const string VERSION = "8.2.0";
public const string VERSION = "8.3.0";

}