Yes, this works; the secure flag is not ignored by OutputString. You
can also set the httponly flag in the same way (but I think httponly
requires python 2.7+)
> Alternatively it looks like there's a hook to
> provide your own Cookie implementation by defining a method "_new_cookie" in
> your RequestHandler.
That's not a hook - in general methods beginning with underscores in
Tornado are internal implementation details, and subject to change
without warning in future releases. (there are a few underscore
methods that are OK for you to use and override; these are usually
listed in the docs). If you want to do your own cookie handling you
should use add_header to set the Set-Cookie header directly.
-Ben