#NEWLINE# @ webob . dec . wsgify #NEWLINE# def test_application( req ) : #NEWLINE# #INDENT# if ( req . path_info == '/server_cors' ) : #NEWLINE# #INDENT# response = webob . Response ( status = 200 ) #NEWLINE# response . headers [ 'Access-Control-Allow-Origin' ] = req . headers [ 'Origin' ] #NEWLINE# response . headers [ 'X-Server-Generated-Response' ] = '1' #NEWLINE# return response #NEWLINE# #UNINDENT# if ( req . path_info == '/server_cors_vary' ) : #NEWLINE# #INDENT# response = webob . Response ( status = 200 ) #NEWLINE# response . headers [ 'Vary' ] = 'Custom-Vary' #NEWLINE# return response #NEWLINE# #UNINDENT# if ( req . path_info == '/server_no_cors' ) : #NEWLINE# #INDENT# response = webob . Response ( status = 200 ) #NEWLINE# return response #NEWLINE# #UNINDENT# if ( req . method == 'OPTIONS' ) : #NEWLINE# #INDENT# raise exc . HTTPNotFound ( ) #NEWLINE# #UNINDENT# return 'Hello World'