Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#33571 closed Bug (fixed)

Fix handling empty string for If-Modified-Since header

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

Description

Empty string used to be ignored for If-Modified-Since header, but now raises exception since d6aff369ad3.

Change History (6)

comment:1 by Collin Anderson, 2 years ago

Has patch: set

comment:2 by Mariusz Felisiak, 2 years ago

Owner: changed from nobody to Collin Anderson
Status: newassigned
Triage Stage: UnreviewedAccepted

Thanks for the report.

Regression in d6aff369ad33457ae2355b5b210faf1c4890ff35.

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

Resolution: fixed
Status: assignedclosed

In 71017a68:

Fixed #33571 -- Fixed static serving views crash when If-Modified-Since is empty.

Regression in d6aff369ad33457ae2355b5b210faf1c4890ff35.

comment:4 by Collin Anderson, 2 years ago

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.

in reply to:  4 comment:5 by Mariusz Felisiak, 2 years ago

Replying to 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 Django’s release process for more details.

comment:6 by Collin Anderson, 2 years ago

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. :)

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