webmcp
view framework/env/request/get_relative_baseurl.lua @ 202:eceb6f56e9ed
Use luaL_len and lua_gettable to read argument passed to json.array{...}
| author | jbe |
|---|---|
| date | Mon Aug 25 20:00:01 2014 +0200 (2014-08-25) |
| parents | 9fdfb27f8e67 |
| children |
line source
1 --[[--
2 baseurl =
3 request.get_relative_baseurl()
5 This function returns a relative base URL of the application. If request.force_absolute_baseurl() has been called before, an absolute URL is returned.
7 --]]--
9 function request.get_relative_baseurl()
10 if request._force_absolute_baseurl then
11 return (request.get_absolute_baseurl())
12 else
13 return request._relative_baseurl
14 end
15 end
