Opened 4 years ago

Closed 4 years ago

#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, 4 years ago

Cc: chamalsl added

comment:2 by Mariusz Felisiak, 4 years ago

Component: File uploads/storage → HTTP handling
Owner: changed from nobody to Mariusz Felisiak
Status: new → assigned
Triage Stage: Unreviewed → Accepted
Type: Uncategorized → Bug

Thanks for the report!

comment:3 by Mariusz Felisiak, 4 years ago

Has patch: set

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

Resolution: → fixed
Status: assigned → closed

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