Opened 9 years ago

Closed 3 years ago

#5686 closed Cleanup/optimization (fixed)

separate functions in CommonMiddleware.process_response

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


I wanted to modify the 404 handling behaviour of CommonMiddlware, but it's in CommonMiddlware.proccess_response, and I couldn't override it without clobbering the etag stuff. Attached is a slight refactoring that separates the several parts of process_response in to their own methods.

Attachments (1)

commonmiddleware.diff (4.1 KB) - added by keturn 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by keturn

comment:1 Changed 9 years ago by keturn

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset

comment:2 Changed 9 years ago by keturn

the alternate conclusion that one might draw from this is that each middleware object should only have one job, and that a "common" middleware object is just trouble.

comment:3 Changed 9 years ago by Thomas Guettler (Home)

  • Owner changed from nobody to anonymous
  • Status changed from new to assigned

I had this idea, too. Looks reasonable.

comment:4 Changed 9 years ago by Thomas Guettler (Home)

Sorry, I unfortunately assigned this ticket to anonymous. I couldn't find a way to get
it unassigned again.

comment:5 Changed 8 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

Note that the patch isn't Python 2.3 compatible -- it uses @decorator syntax -- so this can't go in until that's fixed.

comment:6 Changed 7 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to HTTP handling

comment:7 Changed 5 years ago by gabrielhurley

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:8 Changed 5 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:9 Changed 5 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:10 Changed 3 years ago by aaugustin

  • Resolution set to fixed
  • Status changed from assigned to closed

I recently split BrokenLinkEmailsMiddleware out of CommonMiddleware.

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