Opened 17 years ago

Closed 11 years ago

#5686 closed Cleanup/optimization (fixed)

separate functions in CommonMiddleware.process_response

Reported by: Kevin Turner Owned by: anonymous
Component: HTTP handling Version: dev
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 17 years ago.

Download all attachments as: .zip

Change History (11)

by Kevin Turner, 17 years ago

Attachment: commonmiddleware.diff added

comment:1 by Kevin Turner, 17 years ago

Needs tests: set

comment:2 by Kevin Turner, 17 years ago

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 by Thomas Guettler (Home), 17 years ago

Owner: changed from nobody to anonymous
Status: newassigned

I had this idea, too. Looks reasonable.

comment:4 by Thomas Guettler (Home), 17 years ago

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

comment:5 by Jacob, 16 years ago

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

Component: UncategorizedHTTP handling

comment:7 by Gabriel Hurley, 13 years ago

Severity: Normal
Type: Cleanup/optimization

comment:8 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:9 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:10 by Aymeric Augustin, 11 years ago

Resolution: fixed
Status: assignedclosed

I recently split BrokenLinkEmailsMiddleware out of CommonMiddleware.

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