view examples/tutorial/geddit/lib/ajax.py @ 967:19ac5d8fd96c trunk

Fix a number of tests which Python's new hash randomization is causing to fail randomly.
author hodgestar
date Sat, 29 Dec 2012 19:14:10 +0000
parents abad7c2ebe15
children
line wrap: on
line source
import cherrypy

def is_xhr():
    requested_with = cherrypy.request.headers.get('X-Requested-With')
    return requested_with and requested_with.lower() == 'xmlhttprequest'
Copyright (C) 2012-2017 Edgewall Software