webmcp

view framework/env/request/get_absolute_baseurl.lua @ 28:ea2e8f3a2776

allow webmcp path to be set in cgi script

this allows another script to include the webmcp script when the cwd is not the cgi-bin. the script needs to set the WEBMCP_PATH variable.
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sun Sep 19 01:36:08 2010 +0200 (2010-09-19)
parents 944642a3e488
children 2169a62e12f5
line source
1 --[[--
2 baseurl =
3 request.get_absolute_baseurl()
5 This function returns the absolute base URL of the application, as set by request.set_absolute_baseurl(...).
7 --]]--
9 function request.get_absolute_baseurl()
10 if request._absolute_baseurl then
11 return request._absolute_baseurl
12 else
13 error("Absolute base URL is unknown. It should be set in the configuration by calling request.set_absolute_baseurl(...).")
14 end
15 end

Impressum / About Us