-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic in template rendering causes dumping of panic in to response #14525
Comments
Related to #14466 |
This will be due to the panic writing a header and the original template renderer writing a header. Unfortunately I don't think there is likely to be a solution here. You have to write the header before you start writing the template but if there is a panic in the template then the panic handler will attempt to write the header again. So I think we're just gonna have to accept this one as a wontfix |
Are you sure that is correct? Do we really want that if panic occurs during template rendering, the error page's HTML content is dumped as |
@CirnoT your original message was about the writeheader log message - not about it being dumped as plain text. WriteHeader will always have to happen. I'll reopen. It's really really helpful if the issue is clear from the start as to what the real problem is. |
When there is a panic during template rendering unrolled/render will automatically render the error. This leads to the panic being displayed in the page and not a 500 page Fix go-gitea#14467 Fix go-gitea#14525 Signed-off-by: Andrew Thornton <art27@cantab.net>
[x]
):Description
Template render errors cause HTML content of
Internal Server Error
page being displayed astext/plain
along with full panic message.The text was updated successfully, but these errors were encountered: