Opened 9 years ago

Closed 4 years ago

#5686 closed Cleanup/optimization (fixed)

separate functions in CommonMiddleware.process_response

Reported by: Kevin Turner 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

Description

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 Kevin Turner 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by Kevin Turner

Attachment: commonmiddleware.diff added

comment:1 Changed 9 years ago by Kevin Turner

Needs tests: set

comment:2 Changed 9 years ago by Kevin Turner

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: newassigned

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 9 years ago by Jacob

Triage Stage: UnreviewedAccepted

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 8 years ago by Thejaswi Puthraya

Component: UncategorizedHTTP handling

comment:7 Changed 6 years ago by Gabriel Hurley

Severity: Normal
Type: Cleanup/optimization

comment:8 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:9 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:10 Changed 4 years ago by Aymeric Augustin

Resolution: fixed
Status: assignedclosed

I recently split BrokenLinkEmailsMiddleware out of CommonMiddleware.

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