[PR #1137] [MERGED] use correct content-type when overwriting and copying files #1846

Closed
opened 2026-03-04 02:02:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1137
Author: @liuyongqing
Created: 8/26/2019
Status: Merged
Merged: 8/29/2019
Merged by: @gaul

Base: masterHead: master


📝 Commits (3)

  • 813801a use correct content-type when overwriting and copying files
  • 52ed8a7 add content-type test case
  • 6412860 check file /etc/mime.types exist to decide run check_content_type test case

📊 Changes

3 files changed (+37 additions, -15 deletions)

View changed files

📝 src/curl.cpp (+12 -9)
📝 test/integration-test-main.sh (+11 -2)
📝 test/test-utils.sh (+14 -4)

📄 Description

When overwriting and copying a file, we need to use /etc/mime.types to decide the file Content-Type, rather than cached meta Content-Type。

Details

When overwriting and copying files, s3fs use the original file Content-Type meta cache,the cached Content-Type may be not correct, for example the file upload by a machine doest not have file /etc/mine.types。So in order to allow user fixed the wrong Content-Type, we need to use /etc/mime.types to decide the file Content-Type。


🔄 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/s3fs-fuse/s3fs-fuse/pull/1137 **Author:** [@liuyongqing](https://github.com/liuyongqing) **Created:** 8/26/2019 **Status:** ✅ Merged **Merged:** 8/29/2019 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`813801a`](https://github.com/s3fs-fuse/s3fs-fuse/commit/813801ae169d6af54738295c1448c7555d9c8735) use correct content-type when overwriting and copying files - [`52ed8a7`](https://github.com/s3fs-fuse/s3fs-fuse/commit/52ed8a7afaaa5182f844baecf05f685bdfbdeb57) add content-type test case - [`6412860`](https://github.com/s3fs-fuse/s3fs-fuse/commit/64128603874934fbf003f8bb38fbe68d8149af7b) check file /etc/mime.types exist to decide run check_content_type test case ### 📊 Changes **3 files changed** (+37 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/curl.cpp` (+12 -9) 📝 `test/integration-test-main.sh` (+11 -2) 📝 `test/test-utils.sh` (+14 -4) </details> ### 📄 Description When overwriting and copying a file, we need to use /etc/mime.types to decide the file Content-Type, rather than cached meta Content-Type。 ### Details When overwriting and copying files, s3fs use the original file Content-Type meta cache,the cached Content-Type may be not correct, for example the file upload by a machine doest not have file /etc/mine.types。So in order to allow user fixed the wrong Content-Type, we need to use /etc/mime.types to decide the file Content-Type。 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:02:27 +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/s3fs-fuse#1846
No description provided.