<s> try : <EOL> from threading import local <EOL> except ImportError : <EOL> from django . utils . _threading_local import local <EOL> _thread_locals = local ( ) <EOL> def request_is_secure ( ) : <EOL> return getattr ( _thread_locals , '<STR_LIT>' , None ) <EOL> class ThreadLocals ( object ) : <EOL> def process_request ( self , request ) : <EOL> _thread_locals . cb_request_is_secure = request . is_secure ( ) </s>
