Skip to content

Conversation

@mzur
Copy link
Contributor

@mzur mzur commented Dec 12, 2025

An open-ended range like bytes=0- produced an invalid header bytes=0-null, resulting in no data being transferred. This patch implements support for open-ended ranges (bytes=0-) and suffix ranges (bytes=-500).

I confirmed the fix manually using the local system-test. I also wanted to add a test case for this but it seemed like this requires a full integration test which could be a little over the top? Could you give me a hint how best to add a test?

While testing a suffix range like bytes=-10 (which should return the last 10 bytes) I may have found another bug. The response returns the correct data but has the headers Content-Range: bytes 0-10/761 and Content-Length: 11 which seem incorrect.

References #7971

An open-ended range like `bytes=0-` produced an invalid header
like "bytes=0-null", resulting in no data being transferred. This
patch implements support for open-ended ranges (`bytes=0-`) and
suffix ranges (`bytes=-500`).

References dCache#7971

Signed-off-by: Martin Zurowietz <info@mzur.de>
@kofemann
Copy link
Member

kofemann commented Dec 18, 2025

@mzur Thanks for the contribution. Could you please sign your commit with "Signed-off-by: ..." as described at https://github.com/dCache/dcache/blob/master/CONTRIBUTING.md#external-contribution-formalities

@kofemann
Copy link
Member

Ah, it's already signed! Thanks!

@kofemann kofemann merged commit c69dcc2 into dCache:master Dec 18, 2025
1 check passed
@mzur mzur deleted the patch-1 branch December 18, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants