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

Feat: support multi range #160

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

byene0923
Copy link
Member

What type of PR is this?
feat

What this PR does / why we need it (English/Chinese):
en:

  • separate singlePart from fsSmallFileReader and bigFileReader
  • add bigRangeReader and smallRangeReader, support singlePart and multiPart
  • add tests of writeTo() function and case of muliRange

ch:

  • singlePartfsSmallFileReaderbigFileReader 分离
  • 添加bigRangeReadersmallRangeReader, 支持 singlePart multiPart
  • 补充writeTo()方法和muliRange 场景的测试

Which issue(s) this PR fixes:
#93

addtion
ch:
文档https://yn9nycbt37.feishu.cn/docx/doxcnKSdKp9cMtjtF3ClkN705Qc
问题

  1. bigRangeReadersmallRangeReader 存在较多重复代码,想了很久,不太好统一起来- -
  2. 如果请求的是目录,标准库针对range场景,是返回全部数据。这点与标准库不一致(原有的singlePart场景也是)

@byene0923 byene0923 changed the title Feat/support multi range 8 Feat: support multi range Aug 1, 2022
fix:fix bug

fix: remove useless code

fix: lint code
@Duslia
Copy link
Member

Duslia commented Nov 9, 2022

Has this pr finished? Maybe you can fix ci first.

@byene0923
Copy link
Member Author

Has this pr finished? Maybe you can fix ci first.

yeah, this has been finished, i will fix it this weekend, by the way, i have also pull it to the fasthttp valyala/fasthttp#1398

@byene0923
Copy link
Member Author

finished @Duslia

@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 67.25% // Head: 66.28% // Decreases project coverage by -0.96% ⚠️

Coverage data is based on head (3ee0b03) compared to base (d957978).
Patch coverage: 50.22% of modified lines in pull request are covered.

❗ Current head 3ee0b03 differs from pull request most recent head d24b018. Consider uploading reports for the commit d24b018 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #160      +/-   ##
===========================================
- Coverage    67.25%   66.28%   -0.97%     
===========================================
  Files           89       89              
  Lines         8578     8952     +374     
===========================================
+ Hits          5769     5934     +165     
- Misses        2448     2641     +193     
- Partials       361      377      +16     
Impacted Files Coverage Δ
pkg/app/fs.go 59.81% <49.65%> (-8.85%) ⬇️
pkg/protocol/header.go 73.76% <69.23%> (-0.09%) ⬇️
pkg/app/server/option.go 93.49% <0.00%> (-3.26%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2022

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants