MCPcopy Create free account
hub / github.com/apache/httpd / lua_ap_escape_logitem

Function lua_ap_escape_logitem

modules/lua/lua_request.c:1685–1697  ·  view source on GitHub ↗

* ap_escape_logitem (apr_pool_t *p, const char *str) * Escape a string for logging * @param p The pool to allocate from * @param str The string to escape * @return The escaped string */

Source from the content-addressed store, hash-verified

1683 * @return The escaped string
1684 */
1685static int lua_ap_escape_logitem(lua_State *L)
1686{
1687 char *returnValue;
1688 request_rec *r;
1689 const char *str;
1690 luaL_checktype(L, 1, LUA_TUSERDATA);
1691 r = ap_lua_check_request_rec(L, 1);
1692 luaL_checktype(L, 2, LUA_TSTRING);
1693 str = lua_tostring(L, 2);
1694 returnValue = ap_escape_logitem(r->pool, str);
1695 lua_pushstring(L, returnValue);
1696 return 1;
1697}
1698
1699/**
1700 * ap_strcmp_match (const char *str, const char *expected)

Callers

nothing calls this directly

Calls 2

ap_escape_logitemFunction · 0.85
ap_lua_check_request_recFunction · 0.70

Tested by

no test coverage detected