#34405 closed Bug (fixed)

Improper guessing of Mime Type for "br" and "Z" file types

Reported by: chamalsl Owned by: Mariusz Felisiak
Component: HTTP handling Version: 4.1
Severity: Normal Keywords:
Cc: chamalsl Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Below FileResponse will set the content type as text/html, even if the last file extension is "Z' or "br".

FileResponse(open('test.html.Z', 'rb'))
FileResponse(open('test.html.br', 'rb'))

Change History (4)

comment:1 by chamalsl, 20 months ago

Cc: chamalsl added

comment:2 by Mariusz Felisiak, 20 months ago

Component: File uploads/storageHTTP handling
Owner: changed from nobody to Mariusz Felisiak
Status: newassigned
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Thanks for the report!

comment:3 by Mariusz Felisiak, 20 months ago

Has patch: set

comment:4 by GitHub <noreply@…>, 20 months ago

Resolution: fixed
Status: assignedclosed

In 254ad2e:

Fixed #34405 -- Fixed setting Content-Type header in FileResponse for compress and brotli.

Thanks Chamal De Silva for the report.

Note: See TracTickets for help on using tickets.
Back to Top