dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.22k stars 281 forks source link

feat: add accept ranges header #3433

Closed jim3ma closed 1 month ago

jim3ma commented 1 month ago

Description

For library like opencv, it depends on AcceptRanges, otherwise it will complain "partial file" error.

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

Checklist

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 52.65%. Comparing base (22913db) to head (11e4489). Report is 2 commits behind head on main.

Files Patch % Lines
client/daemon/peer/peertask_reuse.go 22.22% 4 Missing and 3 partials :warning:
client/daemon/transport/transport.go 0.00% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433/graphs/tree.svg?width=650&height=150&src=pr&token=PUICJYSAT7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) ```diff @@ Coverage Diff @@ ## main #3433 +/- ## ========================================== + Coverage 52.58% 52.65% +0.06% ========================================== Files 194 194 Lines 20582 20587 +5 ========================================== + Hits 10824 10840 +16 + Misses 8950 8937 -13 - Partials 808 810 +2 ``` | [Flag](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | `52.65% <20.00%> (+0.06%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [client/daemon/transport/transport.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433?src=pr&el=tree&filepath=client%2Fdaemon%2Ftransport%2Ftransport.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi90cmFuc3BvcnQvdHJhbnNwb3J0Lmdv) | `38.25% <0.00%> (-0.15%)` | :arrow_down: | | [client/daemon/peer/peertask\_reuse.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433?src=pr&el=tree&filepath=client%2Fdaemon%2Fpeer%2Fpeertask_reuse.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9wZWVyL3BlZXJ0YXNrX3JldXNlLmdv) | `63.25% <22.22%> (-0.21%)` | :arrow_down: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3433/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)