Opened 18 years ago
Closed 13 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)
Change History (11)
by , 18 years ago
| Attachment: | commonmiddleware.diff added |
|---|
comment:1 by , 18 years ago
| Needs tests: | set |
|---|
comment:2 by , 18 years ago
comment:3 by , 18 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
I had this idea, too. Looks reasonable.
comment:4 by , 18 years ago
Sorry, I unfortunately assigned this ticket to anonymous. I couldn't find a way to get
it unassigned again.
comment:5 by , 18 years ago
| Triage Stage: | Unreviewed → 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 by , 16 years ago
| Component: | Uncategorized → HTTP handling |
|---|
comment:7 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → Cleanup/optimization |
comment:10 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
I recently split BrokenLinkEmailsMiddleware out of CommonMiddleware.
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.