[PR #240] [MERGED] fakestorage: misc fixes #450

Closed
opened 2026-03-03 12:30:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/240
Author: @someone1
Created: 5/8/2020
Status: Merged
Merged: 5/11/2020
Merged by: @fsouza

Base: masterHead: misc-fixes


📝 Commits (6)

  • fdc2576 fakestorage: misc fixes
  • 38a1d6b switch to strconv.FormatInt from fmt.Sprintf
  • 5179b56 update CreateObject to return newly created object
  • 5edba1e fakestorage: add Content-Encoding header on HEAD/GET requests
  • 317b9f1 fakestorage: support signed url uploads
  • 3c185e2 fakestorage: revert public API change

📊 Changes

8 files changed (+152 additions, -21 deletions)

View changed files

📝 fakestorage/object.go (+25 -4)
📝 fakestorage/server.go (+4 -0)
📝 fakestorage/upload.go (+59 -3)
📝 fakestorage/upload_test.go (+48 -0)
📝 internal/backend/backend_test.go (+3 -3)
📝 internal/backend/fs.go (+6 -6)
📝 internal/backend/memory.go (+6 -4)
📝 internal/backend/storage.go (+1 -1)

📄 Description

  • Add Last-Modified and X-Goog-Generation HTTP headers for GET/HEAD object requests
  • Fallback to original object's metadata on rewrite requests
  • Return object generation number if available after upload
  • Fix Object Generation JSON encoding to align with Go library

Signed-off-by: Prateek Malhotra someone1@gmail.com

Fixes #239


🔄 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/240 **Author:** [@someone1](https://github.com/someone1) **Created:** 5/8/2020 **Status:** ✅ Merged **Merged:** 5/11/2020 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `master` ← **Head:** `misc-fixes` --- ### 📝 Commits (6) - [`fdc2576`](https://github.com/fsouza/fake-gcs-server/commit/fdc2576cb834c0f17c4f67c7a9f830e0e73d5fed) fakestorage: misc fixes - [`38a1d6b`](https://github.com/fsouza/fake-gcs-server/commit/38a1d6b6eafaa2a4a4d40b01279d4c1633843eaa) switch to strconv.FormatInt from fmt.Sprintf - [`5179b56`](https://github.com/fsouza/fake-gcs-server/commit/5179b561367c59f6a57a33d819e2163cd2944fcf) update CreateObject to return newly created object - [`5edba1e`](https://github.com/fsouza/fake-gcs-server/commit/5edba1ed49c6c45fd07232a34cd0f52a0ab34390) fakestorage: add Content-Encoding header on HEAD/GET requests - [`317b9f1`](https://github.com/fsouza/fake-gcs-server/commit/317b9f1c7808b79a681996e711144bfbb427e0ab) fakestorage: support signed url uploads - [`3c185e2`](https://github.com/fsouza/fake-gcs-server/commit/3c185e26e6648d19655a15176504860a8add2780) fakestorage: revert public API change ### 📊 Changes **8 files changed** (+152 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+25 -4) 📝 `fakestorage/server.go` (+4 -0) 📝 `fakestorage/upload.go` (+59 -3) 📝 `fakestorage/upload_test.go` (+48 -0) 📝 `internal/backend/backend_test.go` (+3 -3) 📝 `internal/backend/fs.go` (+6 -6) 📝 `internal/backend/memory.go` (+6 -4) 📝 `internal/backend/storage.go` (+1 -1) </details> ### 📄 Description * Add Last-Modified and X-Goog-Generation HTTP headers for GET/HEAD object requests * Fallback to original object's metadata on rewrite requests * Return object generation number if available after upload * Fix Object Generation JSON encoding to align with Go library Signed-off-by: Prateek Malhotra <someone1@gmail.com> Fixes #239 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:30:05 +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#450
No description provided.