CGIplus-enabled Run-time Environment Example
--------------------------------------------
***** FIRST, EVIDENCE OF PERSISTANCE *****
Usage Count: 4
***** SECOND, THE CGI ENVIRONMENT AVAILABLE *****
WWW_AUTH_TYPE=
WWW_CONTENT_LENGTH=0
WWW_CONTENT_TYPE=
WWW_DOCUMENT_ROOT=
WWW_GATEWAY_BG=BG2915:
WWW_GATEWAY_INTERFACE=CGI/1.1
WWW_GATEWAY_EOF=$Z-970FB1A4753A94556DC61912-
WWW_GATEWAY_EOT=$D-0FF9FD6B7A795DB09AA1F5F1-
WWW_GATEWAY_ESC=$E-03202EFE522687674521A87C-
WWW_GATEWAY_MRS=4492
WWW_HTTP_ACCEPT=*/*
WWW_HTTP_ACCEPT_ENCODING=gzip, br, zstd, deflate
WWW_HTTP_HOST=polarhome.com:703
WWW_HTTP_USER_AGENT=Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
WWW_PATH_INFO=
WWW_PATH_TRANSLATED=
WWW_QUERY_STRING=
WWW_REMOTE_ADDR=3.138.178.162
WWW_REMOTE_HOST=3.138.178.162
WWW_REMOTE_PORT=55952
WWW_REMOTE_USER=
WWW_REQUEST_METHOD=GET
WWW_REQUEST_SCHEME=http:
WWW_REQUEST_TIME_GMT=Thu, 23 Jan 2025 03:24:06 GMT
WWW_REQUEST_TIME_LOCAL=Thu, 23 Jan 2025 05:24:06
WWW_REQUEST_URI=/rtbin/version.c
WWW_SCRIPT_FILENAME=WASD_ROOT:[SRC.HTTPD]VERSION.C
WWW_SCRIPT_NAME=/rtbin/version.c
WWW_SCRIPT_RTE=cgi-bin:[000000]rte_example.exe
WWW_SERVER_ADDR=192.168.10.2
WWW_SERVER_CHARSET=ISO-8859-1
WWW_SERVER_GMT=+02:00
WWW_SERVER_NAME=vax.polarhome.com
WWW_SERVER_PROTOCOL=HTTP/1.1
WWW_SERVER_PORT=80
WWW_SERVER_SIGNATURE=
WASD/10.3.0 Server at vax.polarhome.com Port 80
WWW_SERVER_SOFTWARE=HTTPd-WASD/10.3.0 OpenVMS/VAX
WWW_UNIQUE_ID=Z5HSdgAAAAQAAAIeLfM
WWW_SECURITY_STATUS=NONE
WWW_KEY_COUNT=0
***** THIRD, AN "INTERPRETED" FILE (WWW_SCRIPT_NAME/WWW_SCRIPT_FILENAME) *****
[0001] /*****************************************************************************/
[0002] /*
[0003] version.c
[0004]
[0005] Merely generate software ID and build information strings.
[0006]
[0007]
[0008] 10-OCT-1999 MGD moved from HTTPD.C for v6.1
[0009] */
[0010] /*****************************************************************************/
[0011]
[0012] #ifdef WASD_VMS_V7
[0013] #undef _VMS__V6__SOURCE
[0014] #define _VMS__V6__SOURCE
[0015] #undef __VMS_VER
[0016] #define __VMS_VER 70000000
[0017] #undef __CRTL_VER
[0018] #define __CRTL_VER 70000000
[0019] #endif
[0020]
[0021] #include
[0022] #include
[0023]
[0024] #include "wasd.h"
[0025]
[0026] #ifdef __ia64
[0027] # define HTTPD_ARCH "IA64"
[0028] #endif
[0029] #ifdef __ALPHA
[0030] # define HTTPD_ARCH "AXP"
[0031] #endif
[0032] #ifdef __VAX
[0033] # define HTTPD_ARCH "VAX"
[0034] #endif
[0035]
[0036] #ifndef BUILD_DATETIME
[0037] # define BUILD_DATETIME __DATE__ " " __TIME__
[0038] #endif
[0039]
[0040] /******************/
[0041] /* global storage */
[0042] /******************/
[0043]
[0044] int ActivityGblSecVersion = ACTIVITY_GBLSEC_VERSION_NUMBER,
[0045] AuthGblSecVersion = AUTH_GBLSEC_VERSION_NUMBER,
[0046] AuthTokenGblSecVersion = AUTH_TOKEN_GBLSEC_VERSION_NUMBER,
[0047] HttpdGblSecVersion = HTTPD_GBLSEC_VERSION_NUMBER,
[0048] SesolaGblSecVersion = SESOLA_GBLSEC_VERSION_NUMBER,
[0049] ProxyVerifyGblSecVersion = PROXYVERIFY_GBLSEC_VERSION_NUMBER;
[0050]
[0051] char BuildDateTime [] = BUILD_DATETIME,
[0052] BuildInfo [64],
[0053] HttpdName [] = HTTPD_NAME,
[0054] HttpdSoftwareIdName [] = HTTPD_SOFTWAREID_NAME,
[0055] HttpdVersion [] = HTTPD_VERSION,
[0056] SoftwareID [128];
[0057]
[0058] /********************/
[0059] /* external storage */
[0060] /********************/
[0061]
[0062] extern char HttpdSesola[];
[0063]
[0064] /*****************************************************************************/
[0065] /*
[0066] */
[0067]
[0068] VersionInfo ()
[0069]
[0070] {
[0071] char *cptr, *sptr;
[0072]
[0073] /*********/
[0074] /* begin */
[0075] /*********/
[0076]
[0077] /* software ID can be specified on the command line! */
[0078] if (!SoftwareID[0])
[0079] sprintf (SoftwareID, "%s/%s OpenVMS/%s%s",
[0080] HttpdSoftwareIdName, HttpdVersion, HTTPD_ARCH, HttpdSesola);
[0081]
[0082] sprintf (BuildInfo, "%s VMS %s DECC %d%s",
[0083] BUILD_DATETIME, __VMS_VERSION+1, __DECC_VER,
[0084] OPERATE_WITH_SYSPRV ? " [/SYSPRV]" : "");
[0085]
[0086] /* compress white-space */
[0087] cptr = sptr = BuildInfo;
[0088] while (*cptr)
[0089] {
[0090] if (*cptr == ' ')
[0091] {
[0092] *sptr++ = *cptr++;
[0093] while (*cptr == ' ') cptr++;
[0094] }
[0095] else
[0096] *sptr++ = *cptr++;
[0097] }
[0098] *sptr = '\0';
[0099] }
[0100]
[0101] /*****************************************************************************/
[0102]