[#188] Improve content-type detector (support) #213

Merged
alexvanin merged 2 commits from KurlesHS/frostfs-http-gw:feat/improve_contenttype_detector into support/v0.32 2025-02-14 11:16:29 +00:00
Member

I looked at several libraries that guess the content type from the content, but none of them correctly identified either the text/css or text/javascript content type.
I also investigated how the rclone utility and the MinIO server determine the type of content. Both of these software first pay attention to the content-type header. If it's missing, they set the content type by file extension.

In our case, I decided to combine both methods. First, we will attempt to determine the content type based on the content itself. If the content appears to be text/plain, we will then use the file extension to determine the exact type of content.

I looked at several libraries that guess the content type from the content, but none of them correctly identified either the `text/css` or `text/javascript` content type. I also investigated how the rclone utility and the MinIO server determine the type of content. Both of these software first pay attention to the `content-type` header. If it's missing, they set the content type by file extension. In our case, I decided to combine both methods. First, we will attempt to determine the content type based on the content itself. If the content appears to be `text/plain`, we will then use the file extension to determine the exact type of content.
KurlesHS added 1 commit 2025-02-14 08:21:36 +00:00
[#188] Improve content-type detector
All checks were successful
/ DCO (pull_request) Successful in 30s
/ Vulncheck (pull_request) Successful in 47s
/ Builds (pull_request) Successful in 55s
/ Lint (pull_request) Successful in 2m37s
/ Tests (pull_request) Successful in 56s
65df996f3b
Signed-off-by: Aleksey Kravchenko <al.kravchenko@yadro.com>
requested reviews from storage-services-developers, storage-services-committers 2025-02-14 08:21:36 +00:00
KurlesHS was assigned by dkirillov 2025-02-14 08:30:06 +00:00
dkirillov approved these changes 2025-02-14 08:30:10 +00:00
Dismissed
requested reviews from storage-services-committers, storage-services-developers 2025-02-14 08:37:28 +00:00
pogpp approved these changes 2025-02-14 08:48:03 +00:00
Dismissed
alexvanin approved these changes 2025-02-14 10:43:46 +00:00
Dismissed
alexvanin added 1 commit 2025-02-14 11:09:40 +00:00
Release v0.32.4
All checks were successful
/ DCO (pull_request) Successful in 32s
/ Vulncheck (pull_request) Successful in 42s
/ Builds (pull_request) Successful in 58s
/ Lint (pull_request) Successful in 2m9s
/ Tests (pull_request) Successful in 59s
c803ad802f
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
alexvanin dismissed dkirillov's review 2025-02-14 11:09:41 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

alexvanin dismissed pogpp's review 2025-02-14 11:09:41 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

alexvanin dismissed alexvanin's review 2025-02-14 11:09:41 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Owner

Added release commit

Added release commit
alexvanin approved these changes 2025-02-14 11:10:09 +00:00
alexvanin added this to the v0.32.4 milestone 2025-02-14 11:11:51 +00:00
alexvanin merged commit c803ad802f into support/v0.32 2025-02-14 11:16:29 +00:00
alexvanin deleted branch feat/improve_contenttype_detector 2025-02-14 11:16:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
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: TrueCloudLab/frostfs-http-gw#213
No description provided.