Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

#5363 closed defect (fixed)

[PATCH] RequestDone not caught when raised from post request filter called due to error

Reported by: pacopablo Owned by: Jonas Borgström
Priority: normal Milestone: 0.11
Component: general Version: devel
Severity: major Keywords:
Cc: pacopablo@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

OK, this is a small patch, but kind of hard to explain issue.

So, if an exception is raised, such at PermissionError, etc. The post request filters are run, which is as it should be. If however, a post request filter ends with a RequestDone exception, as is the case when one calls req.redirect() then the RequestDone exception isn't caught.

This causes a traceback to appear in the logs, and, for me, seems to slow down the response of the request (don't know why, so don't really know if it's possibly related ot something else).

However, I believe that raising RequestDone from said post request handler is valid, and thus shouldn't cause any exception to be shown in the log.

Attachments (1)

post_request_filter.patch (489 bytes ) - added by pacopablo 18 years ago.
Patch for catching RequestDone exception in certain instances from post request filters

Download all attachments as: .zip

Change History (3)

by pacopablo, 18 years ago

Attachment: post_request_filter.patch added

Patch for catching RequestDone exception in certain instances from post request filters

comment:1 by Dave Abrahams <dave@…>, 17 years ago

Severity: normalmajor

Just want to add my strong vote for getting this into 0.11

The plugin that solves #5340 depends on this 2-line patch, so it would close 2 tickets with 2 lines and I could run a stock Trac 0.11 installation.

comment:2 by Noah Kantrowitz, 17 years ago

Milestone: 0.11.10.11
Resolution: fixed
Status: newclosed

Fixed in [5808]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.