* 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 */
| 1683 | * @return The escaped string |
| 1684 | */ |
| 1685 | static 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) |
nothing calls this directly
no test coverage detected