Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#26447 closed Cleanup/optimization (fixed)

Deprecate USE_ETAGS setting in favor of ConditionalGetMiddleware unconditionally setting an ETag

Reported by: Denis Cornehl Owned by: Denis Cornehl
Component: HTTP handling Version: 1.9
Severity: Normal Keywords:
Cc: k@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

In my opinion this setting is not needed (any more)

  • Conditional-Get handling can happen in the ConditionalGetMiddleware, not in CommonMiddleware any more
  • using or not using the middleware is (nearly) the same as setting USE_ETAGS or not
  • ETag Calculation can happen also in the middleware

this also will fix a problem when you use the GZipMiddleware in combination with the Conditional-Get handling in CommonMiddleware.

Open questions for me:

  • ConditionalGetMiddleware also handles Last-Modified/If-Modified-Since , which CommonMiddleware didn't. I don't see a problem in throwing them together and activating/deactivating them together. You?

Change History (8)

comment:1 Changed 6 years ago by Denis Cornehl

Has patch: set
Triage Stage: UnreviewedAccepted

(after some discussions here at the DjangoCon springs I've just set the triage state :) )

comment:2 Changed 6 years ago by Tim Graham

Patch needs improvement: set

Left comments for improvement on the PR.

comment:3 Changed 5 years ago by Tim Graham

Component: UncategorizedHTTP handling

comment:4 Changed 5 years ago by Tim Graham

Description: modified (diff)
Patch needs improvement: unset
Summary: Remove USE_ETAGS settingDeprecate USE_ETAGS setting in favor of ConditionalGetMiddleware unconditionally setting an ETag

comment:5 Changed 5 years ago by Kevin Christopher Henry

Cc: k@… added
Triage Stage: AcceptedReady for checkin

comment:6 Changed 5 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In a840710e:

Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware.

comment:7 Changed 4 years ago by Tim Graham <timograham@…>

In 48d5778:

Refs #26447 -- Removed the USE_ETAGS setting per deprecation timeline.

comment:8 Changed 4 years ago by Tim Graham <timograham@…>

In 8f8a4d1:

Refs #26447 -- Removed outdated ETag comment in CommonMiddleware.

Follow up to 48d57788ee56811fa77cd37b9edf40535f82d87e.

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