comparison web/templog.py @ 552:a335760ad447

uwsgi bits
author Matt Johnston <matt@ucc.asn.au>
date Sat, 06 Jun 2015 15:34:03 +0800
parents 0baa57b6d9ca
children 8ef52f27cf95
comparison
equal deleted inserted replaced
549:0baa57b6d9ca 552:a335760ad447
157 #return str(request.environ) 157 #return str(request.environ)
158 #yield "\n" 158 #yield "\n"
159 #var_lookup = environ['mod_ssl.var_lookup'] 159 #var_lookup = environ['mod_ssl.var_lookup']
160 #return var_lookup("SSL_SERVER_I_DN_O") 160 #return var_lookup("SSL_SERVER_I_DN_O")
161 161
162 @route('/wait')
163 def wait():
164 response.set_header('Content-Type', 'text/plain')
165 yield 'done'
166
162 @bottle.get('/<filename:re:.*\.js>') 167 @bottle.get('/<filename:re:.*\.js>')
163 def javascripts(filename): 168 def javascripts(filename):
164 response.set_header('Cache-Control', "public, max-age=1296000") 169 response.set_header('Cache-Control', "public, max-age=1296000")
165 return bottle.static_file(filename, root='static') 170 return bottle.static_file(filename, root='static')
166 171
167 def main(): 172 def main():
173 """ for standalone testing """
168 #bottle.debug(True) 174 #bottle.debug(True)
169 #bottle.run(reloader=True) 175 #bottle.run(reloader=True)
170 bottle.run(server='cgi', reloader=True) 176 bottle.run(server='cgi', reloader=True)
171 #bottle.run(port=9999, reloader=True) 177 #bottle.run(port=9999, reloader=True)
172 178