def render_response(body=None, status=None, headers=None):
 headers = (headers or [])
 headers.append(('Vary', 'X-Auth-Token'))
 if (body is None):
  body = ''
  status = (status or (204, 'No Content'))
 else:
  body = jsonutils.dumps(body, cls=utils.SmarterEncoder)
  headers.append(('Content-Type', 'application/json'))
  status = (status or (200, 'OK'))
 return webob.Response(body=body, status=('%s %s' % status), headerlist=headers)

def render_response ( body = None , status = None , headers = None ) : headers = ( headers or [ ] ) headers . append ( ( 'Vary' , 'X-Auth-Token' ) ) if ( body is None ) : body = '' status = ( status or ( 204 , 'No Content' ) ) else : body = jsonutils . dumps ( body , cls = utils . SmarterEncoder ) headers . append ( ( 'Content-Type' , 'application/json' ) ) status = ( status or ( 200 , 'OK' ) ) return webob . Response ( body = body , status = ( '%s %s' % status ) , headerlist = headers )
forms a wsgi response .