#937: Collapse redundant hooks
---------------------------+----------------------------------------------- -
Reporter: fumanchu | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone: 3.2
Component: CherryPy code | Keywords:
---------------------------+----------------------------------------------- -
=== Order of filters in CherryPy 2 ===
* on_start_resource
processHeaders()
* before_request_body
processBody()
* before_main
main(), which included controller lookup
* before_finalize
finalize()
* on_end_resource
=== Order of hooks in CherryPy 3: ===
process_headers()[[br]]
get_resource(), which looks up the controller
* on_start_resource
* before_request_body
process_body()
* before_handler
handler()
* before_finalize
finalize()
* on_end_resource
IMO, it would be good to get rid of the 'before_request_body' hookpoint
altogether, and move the builtin tools to use 'on_start_resource' instead.
We could ease migration by having the next version of CP move hooks from
before_request_body to on_start_resource (with a !DeprecationWarning), and
adding 100 to their priority so they all run in the same order but after
all the ones explicitly set at on_start_resource.
--
Ticket URL: <http://www.cherrypy.org/ticket/937>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework