Opened 9 years ago

Closed 8 years ago

Last modified 7 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 by Denis Cornehl, 9 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

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

comment:2 by Tim Graham, 9 years ago

Patch needs improvement: set

Left comments for improvement on the PR.

comment:3 by Tim Graham, 8 years ago

Component: UncategorizedHTTP handling

comment:4 by Tim Graham, 8 years ago

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 by Kevin Christopher Henry, 8 years ago

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

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In a840710e:

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

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

In 48d5778:

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

comment:8 by Tim Graham <timograham@…>, 7 years ago

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