Works with tornado >= 3.0