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

Function lua_ap_custom_response

modules/lua/lua_request.c:1797–1810  ·  view source on GitHub ↗

* ap_custom_response (request_rec *r, int status, const char *string) * Install a custom response handler for a given status * @param r The current request * @param status The status for which the custom response should be used * @param string The custom response. This can be a static string, a file * or a URL */

Source from the content-addressed store, hash-verified

1795 * or a URL
1796 */
1797static int lua_ap_custom_response(lua_State *L)
1798{
1799 request_rec *r;
1800 int status;
1801 const char *string;
1802 luaL_checktype(L, 1, LUA_TUSERDATA);
1803 r = ap_lua_check_request_rec(L, 1);
1804 luaL_checktype(L, 2, LUA_TNUMBER);
1805 status = lua_tointeger(L, 2);
1806 luaL_checktype(L, 3, LUA_TSTRING);
1807 string = lua_tostring(L, 3);
1808 ap_custom_response(r, status, string);
1809 return 0;
1810}
1811
1812
1813/**

Callers

nothing calls this directly

Calls 2

ap_custom_responseFunction · 0.85
ap_lua_check_request_recFunction · 0.70

Tested by

no test coverage detected