Skip to content

make header key initial capital #372

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
Jan 18, 2022
Merged

make header key initial capital #372

merged 2 commits into from
Jan 18, 2022

Conversation

lihsai0
Copy link
Collaborator

@lihsai0 lihsai0 commented Dec 31, 2021

fix #371

同时:

  • 修复 header 解析错误
  • 新增通过大小写不敏感的名字获取 header 的方式,新增 response->normalizedHeader

以下为之前 header 解析错误的例子:

:status: 200
被解析为
"" -> "status"

origin: https://www.qiniu.com
被解析为
"Origin" -> "https"

last-modified: Mon, 06 Sep 2021 06:44:52 GMT
被解析为
"Last-Modified" -> "Mon, 06 Sep 2021 06"

@lihsai0 lihsai0 force-pushed the fix/header-key-naughty branch from 97a086c to 64246cb Compare December 31, 2021 07:16
@codecov
Copy link

codecov bot commented Dec 31, 2021

Codecov Report

Merging #372 (0a2d84b) into master (066b45c) will increase coverage by 0.69%.
The diff coverage is 95.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #372      +/-   ##
==========================================
+ Coverage   87.71%   88.40%   +0.69%     
==========================================
  Files          20       21       +1     
  Lines        1473     1553      +80     
==========================================
+ Hits         1292     1373      +81     
+ Misses        181      180       -1     
Impacted Files Coverage Δ
src/Qiniu/Http/Response.php 77.41% <76.47%> (+2.87%) ⬆️
src/Qiniu/Http/Client.php 100.00% <100.00%> (ø)
src/Qiniu/Http/Header.php 100.00% <100.00%> (ø)
src/Qiniu/Region.php 100.00% <0.00%> (ø)
src/Qiniu/Storage/UploadManager.php 96.55% <0.00%> (+0.12%) ⬆️
src/Qiniu/functions.php 89.28% <0.00%> (+0.19%) ⬆️
src/Qiniu/Storage/ResumeUploader.php 77.33% <0.00%> (+1.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 066b45c...0a2d84b. Read the comment docs.

@lihsai0 lihsai0 force-pushed the fix/header-key-naughty branch 3 times, most recently from 36c7ab4 to c36eb59 Compare January 6, 2022 03:07
- normalizedHeader is case-insensitive
- normalizedHeader can process duplicated field names
- fix parse header field value in a wrong way
- mark header deprecated
@lihsai0 lihsai0 force-pushed the fix/header-key-naughty branch from c36eb59 to 7b86b60 Compare January 6, 2022 08:33
@fatedier
Copy link

Any progress?

@lihsai0
Copy link
Collaborator Author

lihsai0 commented Jan 11, 2022

Any progress?

@fatedier

QA checking

QA 部门验收中

@xwen-winnie xwen-winnie merged commit e036cb7 into master Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response::isJson() 实现问题
5 participants