* ap_os_escape_path (apr_pool_t *p, const char *path, int partial) * convert an OS path to a URL in an OS dependant way. * @param p The pool to allocate from * @param path The path to convert * @param partial if set, assume that the path will be appended to something * with a '/' in it (and thus does not prefix "./") * @return The converted URL */
| 1658 | * @return The converted URL |
| 1659 | */ |
| 1660 | static int lua_ap_os_escape_path(lua_State *L) |
| 1661 | { |
| 1662 | char *returnValue; |
| 1663 | request_rec *r; |
| 1664 | const char *path; |
| 1665 | int partial = 0; |
| 1666 | luaL_checktype(L, 1, LUA_TUSERDATA); |
| 1667 | r = ap_lua_check_request_rec(L, 1); |
| 1668 | luaL_checktype(L, 2, LUA_TSTRING); |
| 1669 | path = lua_tostring(L, 2); |
| 1670 | if (lua_isboolean(L, 3)) |
| 1671 | partial = lua_toboolean(L, 3); |
| 1672 | returnValue = ap_os_escape_path(r->pool, path, partial); |
| 1673 | lua_pushstring(L, returnValue); |
| 1674 | return 1; |
| 1675 | } |
| 1676 | |
| 1677 | |
| 1678 | /** |
nothing calls this directly
no test coverage detected