Opened 7 years ago

Closed 13 months 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 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by keturn

comment:1 Changed 7 years ago by keturn

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

comment:2 Changed 7 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 7 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 7 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 6 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 5 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to HTTP handling

comment:7 Changed 3 years ago by gabrielhurley

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

comment:8 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:9 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:10 Changed 13 months ago by aaugustin

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

I recently split BrokenLinkEmailsMiddleware out of CommonMiddleware.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.