mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
mod_lua: Reformat and escape script error output.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582247 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -99,11 +99,11 @@ static void report_lua_error(lua_State *L, request_rec *r)
|
||||
const char *lua_response;
|
||||
r->status = HTTP_INTERNAL_SERVER_ERROR;
|
||||
r->content_type = "text/html";
|
||||
ap_rputs("<b>Error!</b>\n", r);
|
||||
ap_rputs("<p>", r);
|
||||
ap_rputs("<h3>Error!</h3>\n", r);
|
||||
ap_rputs("<pre>", r);
|
||||
lua_response = lua_tostring(L, -1);
|
||||
ap_rputs(lua_response, r);
|
||||
ap_rputs("</p>\n", r);
|
||||
ap_rputs(ap_escape_html(r->pool, lua_response), r);
|
||||
ap_rputs("</pre>\n", r);
|
||||
|
||||
ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, APLOGNO(01471) "Lua error: %s",
|
||||
lua_response);
|
||||
|
Reference in New Issue
Block a user