close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of RequestFilters


Ignore:
Timestamp:
Jun 25, 2008, 10:32:15 PM (13 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RequestFilters

    v1 v2  
    5151This implementation removes a number of the default filters. You could also add any custom filters you may have, etc.
    5252
    53 Note that the ordering of request filters is quite important. For example, if you insert your custom filter before the `error_filter`, an exception raised in your filter function will not result in a friendly error page, but rather see the exception propagated all the way up. If you insert your filter before the `template_filter`, you will not get a Genshi stream as return value of the next function in the chain, but rather the rendered text.
     53Note that the ordering of request filters is quite important. For example, if you insert your custom filter before the `error_filter`, an exception raised in your filter function will not result in a friendly error page, but rather result in the exception being propagated all the way up to the WSGI gateway. If you insert your filter before the `template_filter`, you will not get a Genshi stream as return value of the next function in the chain, but rather the rendered text.
    5454
    55 Generally it makes the most sense to add custom filters close to the end of the list.
     55When in doubt, add custom filters close to the end of the list.
    5656
    5757== When to Use Request Filters ==