dragonflyoss/Dragonfly2

In proxy mode, seed and peer generate different taskids with range `bytes=xx-` http request

Opened this issue · 0 comments

Bug report:

When client downloads new file with bytes=xxx- header in proxy mode, seed and peer will generate different taskids. Because there are different range fields in urlMeta. Then peer will failed in SyncPieceTasks with seed, which will lead to downloading from source.

The range in peer urlMeta is xxx- here.
image

But scheduler parses range with MaxInt64 as default size. The range here will be xxx-xxx
image
image
image

Expected behavior:

Seed and peer should generate the same taskid with bytes=xxx- http head and peer downloads file from seed.

How to reproduce it:

Download file with range bytes=xxx- in header.

Environment:

  • Dragonfly version: v2.1.6
  • OS:
  • Kernel (e.g. uname -a):
  • Others: