def setup_backoff(config):
 def on_new_response(event):
  backoff = config.registry.settings['backoff']
  if (backoff is not None):
   backoff = utils.encode_header(('%s' % backoff))
   event.response.headers['Backoff'] = backoff
 config.add_subscriber(on_new_response, NewResponse)

def setup_backoff ( config ) : def on_new_response ( event ) : backoff = config . registry . settings [ 'backoff' ] if ( backoff is not None ) : backoff = utils . encode_header ( ( '%s' % backoff ) ) event . response . headers [ 'Backoff' ] = backoff config . add_subscriber ( on_new_response , NewResponse )
attach http requests/responses objects .