[Django] #34405: Improper guessing of Mime Type for "br" and "Z" file types

9 views
Skip to first unread message

Django

unread,
Mar 10, 2023, 10:08:49 PM3/10/23
to django-...@googlegroups.com
#34405: Improper guessing of Mime Type for "br" and "Z" file types
------------------------------------------------+------------------------
Reporter: chamalsl | Owner: nobody
Type: Uncategorized | Status: new
Component: File uploads/storage | Version: 4.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
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'))
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34405>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 10, 2023, 10:09:17 PM3/10/23
to django-...@googlegroups.com
#34405: Improper guessing of Mime Type for "br" and "Z" file types
-------------------------------------+-------------------------------------

Reporter: chamalsl | Owner: nobody
Type: Uncategorized | Status: new
Component: File | Version: 4.1
uploads/storage |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by chamalsl):

* cc: chamalsl (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/34405#comment:1>

Django

unread,
Mar 11, 2023, 2:05:34 AM3/11/23
to django-...@googlegroups.com
#34405: Improper guessing of Mime Type for "br" and "Z" file types
-------------------------------------+-------------------------------------
Reporter: chamalsl | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: HTTP handling | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Mariusz Felisiak
* status: new => assigned
* type: Uncategorized => Bug
* component: File uploads/storage => HTTP handling
* stage: Unreviewed => Accepted


Comment:

Thanks for the report!

--
Ticket URL: <https://code.djangoproject.com/ticket/34405#comment:2>

Django

unread,
Mar 11, 2023, 2:42:39 AM3/11/23
to django-...@googlegroups.com
#34405: Improper guessing of Mime Type for "br" and "Z" file types
-------------------------------------+-------------------------------------
Reporter: chamalsl | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: HTTP handling | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/16642 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34405#comment:3>

Django

unread,
Mar 14, 2023, 12:46:21 AM3/14/23
to django-...@googlegroups.com
#34405: Improper guessing of Mime Type for "br" and "Z" file types
-------------------------------------+-------------------------------------
Reporter: chamalsl | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

Component: HTTP handling | Version: 4.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"254ad2e3450d8175170914f06af8358d2becc35b" 254ad2e]:
{{{
#!CommitTicketReference repository=""
revision="254ad2e3450d8175170914f06af8358d2becc35b"
Fixed #34405 -- Fixed setting Content-Type header in FileResponse for
compress and brotli.

Thanks Chamal De Silva for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34405#comment:4>

Reply all
Reply to author
Forward
0 new messages