Ñò
ô†³Kc @ s d Z d d k l Z d d k Z d g Z d d g Z d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ
d
e f d „ ƒ YZ d e f d
„ ƒ YZ d e f d „ ƒ YZ
d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z e e _ d S( s
Middleware to make internal requests and forward requests internally.
When applied, several keys are added to the environment that will allow
you to trigger recursive redirects and forwards.
paste.recursive.include:
When you call
``environ['paste.recursive.include'](new_path_info)`` a response
will be returned. The response has a ``body`` attribute, a
``status`` attribute, and a ``headers`` attribute.
paste.recursive.script_name:
The ``SCRIPT_NAME`` at the point that recursive lives. Only
paths underneath this path can be redirected to.
paste.recursive.old_path_info:
A list of previous ``PATH_INFO`` values from previous redirects.
Raise ``ForwardRequestException(new_path_info)`` to do a forward
(aborting the current request).
iÿÿÿÿ( t StringIONt RecursiveMiddlewaret ForwardRequestExceptiont CheckForRecursionMiddlewarec B s e Z d „ Z d „ Z RS( c C s | | _ | | _ d S( N( t appt env( t selfR R ( ( s3 /usr/lib/python2.6/site-packages/paste/recursive.pyt __init__! s c C s | i d d ƒ } | | i i d g ƒ j o! t d | | i d f ƒ ‚ n | i i d g ƒ } | i | i i d d ƒ ƒ | i | | ƒ S( Nt PATH_INFOt s paste.recursive.old_path_infosG Forwarding loop detected; %r visited twice (internal redirect path: %s)( t getR t AssertionErrort
setdefaultt appendR ( R t environt start_responset path_infot
old_path_info( ( s3 /usr/lib/python2.6/site-packages/paste/recursive.pyt __call__% s ( t __name__t
__module__R R ( ( ( s3 /usr/lib/python2.6/site-packages/paste/recursive.pyR s c B s# e Z d Z d d „ Z d „ Z RS( s}
A WSGI middleware that allows for recursive and forwarded calls.
All these calls go to the same 'application', but presumably that
application acts differently with different URLs. The forwarded
URLs must be relative to this container.
Interface is entirely through the ``paste.recursive.forward`` and
``paste.recursive.include`` environmental keys.
c C s
| | _ d S( N( t application( R R t global_conf( ( s3 /usr/lib/python2.6/site-packages/paste/recursive.pyR = s c C s¹ t | i | | ƒ | d