[PR #778] [MERGED] Content-Range is incorrectly specified. #908

Closed
opened 2026-03-03 12:32:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/778
Author: @yuki2006
Created: 5/9/2022
Status: Merged
Merged: 5/10/2022
Merged by: @fsouza

Base: mainHead: main


📝 Commits (2)

  • 44d3845 fix Content-Range: end to lastByte.
  • c4614a3 add Content-Range unit test

📊 Changes

2 files changed (+20 additions, -12 deletions)

View changed files

📝 fakestorage/object.go (+5 -4)
📝 fakestorage/server_test.go (+15 -8)

📄 Description

For example, a file of 22709217 bytes content is

should be 0-22709216/22709217 instead of 0-22709217/22709217.

Chrome will not handle this correctly and videos and other files will not play.

image

RFC:
https://httpwg.org/specs/rfc7233.html#header.content-range


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/778 **Author:** [@yuki2006](https://github.com/yuki2006) **Created:** 5/9/2022 **Status:** ✅ Merged **Merged:** 5/10/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`44d3845`](https://github.com/fsouza/fake-gcs-server/commit/44d38452a32607b087544a7cee560c8a1e448821) fix Content-Range: end to lastByte. - [`c4614a3`](https://github.com/fsouza/fake-gcs-server/commit/c4614a3b22ae1d5bcee6d33300a6d4237153d350) add Content-Range unit test ### 📊 Changes **2 files changed** (+20 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+5 -4) 📝 `fakestorage/server_test.go` (+15 -8) </details> ### 📄 Description For example, a file of 22709217 bytes content is should be `0-22709216/22709217` instead of `0-22709217/22709217`. Chrome will not handle this correctly and videos and other files will not play. ![image](https://user-images.githubusercontent.com/1004620/167442426-0ea03214-4d78-455c-b070-0d4cb839b0a9.png) RFC: https://httpwg.org/specs/rfc7233.html#header.content-range --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:32:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#908
No description provided.