Skip to content

Commit db03ad2

Browse files
authored
Merge pull request #241 from qiniu/fix/header-compatibility
fix header compatibility and bump version
2 parents 558cb22 + 1cbc4b1 commit db03ad2

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
**2022-10-26**
2+
3+
v8.3.0
4+
5+
移除:不推荐域名
6+
7+
增加:亚太-首尔 和 华东-浙江2 固定区域
8+
9+
增加:设置存储对象的生命周期 API
10+
11+
优化:分片上传 ctx 超时检测
12+
13+
修复:部分运行环境 Content-Type 请求头不兼容问题(v8.2.0 引入)
14+
15+
修复:分片上传 v2 不允许没有 key 的问题
16+
117
**2022-06-9**
218

319
v8.2.0

src/Qiniu/Http/HttpManager.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ public HttpResult Get(string url, StringDictionary headers, string token, bool b
114114
{
115115
foreach (string fieldName in headers.Keys)
116116
{
117-
wReq.Headers.Add(fieldName, headers[fieldName]);
117+
if (!WebHeaderCollection.IsRestricted(fieldName))
118+
{
119+
wReq.Headers.Add(fieldName, headers[fieldName]);
120+
}
118121
}
119122

120123
if (headers.ContainsKey("Content-Type"))
@@ -264,7 +267,10 @@ public HttpResult Post(string url, StringDictionary headers, string token, bool
264267
{
265268
foreach (string fieldName in headers.Keys)
266269
{
267-
wReq.Headers.Add(fieldName, headers[fieldName]);
270+
if (!WebHeaderCollection.IsRestricted(fieldName))
271+
{
272+
wReq.Headers.Add(fieldName, headers[fieldName]);
273+
}
268274
}
269275

270276
if (headers.ContainsKey("Content-Type"))
@@ -1125,7 +1131,10 @@ public HttpResult PostForm(string url, StringDictionary headers, byte[] data, st
11251131
{
11261132
foreach (string fieldName in headers.Keys)
11271133
{
1128-
wReq.Headers.Add(fieldName, headers[fieldName]);
1134+
if (!WebHeaderCollection.IsRestricted(fieldName))
1135+
{
1136+
wReq.Headers.Add(fieldName, headers[fieldName]);
1137+
}
11291138
}
11301139
}
11311140
if (!string.IsNullOrEmpty(token))

src/Qiniu/Qiniu.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<PostBuildEvent>
2929
</PostBuildEvent>
3030
<ProjectId>Qiniu</ProjectId>
31-
<Version>8.2.0</Version>
31+
<Version>8.3.0</Version>
3232
<Authors>Rong Zhou, Qiniu SDK</Authors>
3333
<Company>Shanghai Qiniu Information Technology Co., Ltd.</Company>
3434
<Description>Qiniu Resource (Cloud) Storage SDK for C#</Description>

src/Qiniu/QiniuCSharpSDK.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public class QiniuCSharpSDK
3737
/// <summary>
3838
/// SDK版本号
3939
/// </summary>
40-
public const string VERSION = "8.2.0";
40+
public const string VERSION = "8.3.0";
4141

4242
}

0 commit comments

Comments
 (0)