* 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 */
| 1795 | * or a URL |
| 1796 | */ |
| 1797 | static 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 | /** |
nothing calls this directly
no test coverage detected