[Django] #33571: Fix handling empty string for If-Modified-Since header

32 views
Skip to first unread message

Django

unread,
Mar 10, 2022, 2:45:05 PM3/10/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
-------------------------------------------+------------------------
Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 4.0
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 |
-------------------------------------------+------------------------
Empty string used to be ignored for If-Modified-Since header, but now
raises exception since d6aff369ad3.

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

Django

unread,
Mar 10, 2022, 2:48:38 PM3/10/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
---------------------------------+--------------------------------------

Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

Pull Request: https://github.com/django/django/pull/15498

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

Django

unread,
Mar 10, 2022, 3:40:09 PM3/10/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: assigned

Component: HTTP handling | Version: 4.0
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):

* owner: nobody => Collin Anderson
* status: new => assigned
* stage: Unreviewed => Accepted


Comment:

Thanks for the report.

Regression in d6aff369ad33457ae2355b5b210faf1c4890ff35.

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

Django

unread,
Mar 11, 2022, 12:19:20 AM3/11/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed

Component: HTTP handling | Version: 4.0
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:"71017a68a6e86b501592e7daf68be3ef4c4c28f2" 71017a68]:
{{{
#!CommitTicketReference repository=""
revision="71017a68a6e86b501592e7daf68be3ef4c4c28f2"
Fixed #33571 -- Fixed static serving views crash when If-Modified-Since is
empty.

Regression in d6aff369ad33457ae2355b5b210faf1c4890ff35.
}}}

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

Django

unread,
Mar 11, 2022, 7:57:46 AM3/11/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed
Component: HTTP handling | Version: 4.0
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
-------------------------------------+-------------------------------------

Comment (by Collin Anderson):

I guess this has been broken since 3.1. Any chance this could be
backported? At least to 4.0? (Feel free to leave in catching
`AssertionError`) I suppose it would need a release note too.

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

Django

unread,
Mar 11, 2022, 3:01:32 PM3/11/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed
Component: HTTP handling | Version: 4.0
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
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:4 Collin Anderson]:


> I guess this has been broken since 3.1. Any chance this could be
backported? At least to 4.0? (Feel free to leave in catching
`AssertionError`) I suppose it would need a release note too.

This is a regression in Django 3.1 which is not supported anymore. Per our
backporting policy this means it doesn't qualify for a backport to 4.0.x
or 3.2.x anymore. See [https://docs.djangoproject.com/en/stable/internals
/release-process/ Django’s release process] for more details.

--
Ticket URL: <https://code.djangoproject.com/ticket/33571#comment:5>

Django

unread,
Mar 11, 2022, 3:18:55 PM3/11/22
to django-...@googlegroups.com
#33571: Fix handling empty string for If-Modified-Since header
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed
Component: HTTP handling | Version: 4.0
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
-------------------------------------+-------------------------------------

Comment (by Collin Anderson):

Could it maybe be considered a "Crashing bug", because it crashes rather
than ignores a bad value? If not that's fine. I suppose most people follow
the advice in the docs and don't use `django.views.static.serve()` in
production. :)

--
Ticket URL: <https://code.djangoproject.com/ticket/33571#comment:6>

Reply all
Reply to author
Forward
0 new messages