k24:k24.6:k24.6.3:start
24.6.3 Class Application
The Application (gb.web) class provides information about a CGI application.
24.6.3.1 Properties
The Application class has six properties:
| Property | Data type | Description |
|---|---|---|
| Root | String | Get the (root) path of the CGI application. |
| Host | String | Determines the current host. |
| Port | String | Get the port specified in the URL request. |
| LogFile | String | Get the path or set the path to the file to which the standard error output is redirected. |
| Protocol | String | Get the protocol or set the protocol used by the HTTP request. |
| Request | String | Returns the request submitted to the CGI application. |
Table 24.6.3.1.1 : Properties of the Application class.
Notes:
- With the CGI environment variable CGI[“SCRIPT_NAME”] you get the root path information as well.
- Alternatively, you can determine the current host via CGI[“HTTP_HOST”].
- You can also determine the port used with CGI[“SERVER_PORT”].
- By default, 'http' is the value of the Protocol property. This property is used internally when returning the URL; as in 'Response.Redirect()'.
- You can also use 'https' as the protocol if, for example, you are working behind a proxy that writes HTTPS requests to http. Then all URLs - that you use - will follow the protocol 'https'.
You can also determine the value of the Application.Request property using CGI environment variables like this:
"http://" & CGI["HTTP_HOST"] &/ CGI["PATH_INFO"] &/ CGI["SCRIPT_NAME"] & "?" & CGI["QUERY_STRING"]
k24/k24.6/k24.6.3/start.txt · Last modified: by 127.0.0.1
