funback
2013-05-16 03:56:30 UTC
I run tornado (2.4.1) instance behind nginx, and when something goes wrong
in tornado, i raise a tornado.web.HTTPError(status_code).
I expect this error response is received by nginx, which will render the
corresponding error page (depending on the status_code) to the client's
browser. However, this is not the case, as I see the traceback printed to
the browser, for example:
Traceback (most recent call last):
File
"/home/me/.virtualenvs/project/local/lib/python2.7/site-packages/tornado/web.py",
line 1037, in _execute
self.prepare()
File "/home/me/.virtualenvs/project/my_server.py", line 236, in prepare
raise tornado.web.HTTPError(403)
HTTPError: HTTP 403: Forbidden
I'm not sure if it is related to the fact that i'm running tornado in debug
mode, but I suspect that doesn't matter as the error response should be
sent to nginx with raise HTTPError call. How can I correct this behavior?
in tornado, i raise a tornado.web.HTTPError(status_code).
I expect this error response is received by nginx, which will render the
corresponding error page (depending on the status_code) to the client's
browser. However, this is not the case, as I see the traceback printed to
the browser, for example:
Traceback (most recent call last):
File
"/home/me/.virtualenvs/project/local/lib/python2.7/site-packages/tornado/web.py",
line 1037, in _execute
self.prepare()
File "/home/me/.virtualenvs/project/my_server.py", line 236, in prepare
raise tornado.web.HTTPError(403)
HTTPError: HTTP 403: Forbidden
I'm not sure if it is related to the fact that i'm running tornado in debug
mode, but I suspect that doesn't matter as the error response should be
sent to nginx with raise HTTPError call. How can I correct this behavior?
--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornado+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornado+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.