mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[PR #254] [CLOSED] Fix off-by-one error on NewRangeReader #461
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#461
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/254
Author: @chowey
Created: 5/28/2020
Status: ❌ Closed
Base:
master← Head:rangereader📝 Commits (2)
2c21831Add test for failing NewRangeReader723d3caFix range requests to account for difference between RFC and how go works📊 Changes
2 files changed (+52 additions, -2 deletions)
View changed files
📝
fakestorage/object.go(+4 -2)📝
fakestorage/object_test.go(+48 -0)📄 Description
For Range request headers, per RFC 7233:
In other words, the
byte-rangeuses thelast-byte-pos. This is subtly different than how Go slice indexing works per the Go language spec:Therefore, we should take the
last-byte-posfrom the Range header and increment it by one to get thehighthat is expected by Go.I created a test that illustrates the point.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.