CGIplus-enabled Run-time Environment Example
--------------------------------------------
***** FIRST, EVIDENCE OF PERSISTANCE *****
Usage Count: 2
***** SECOND, THE CGI ENVIRONMENT AVAILABLE *****
WWW_AUTH_TYPE=
WWW_CONTENT_LENGTH=0
WWW_CONTENT_TYPE=
WWW_CSP_NONCE=9f1ef76a07fe8f65829e8a8afb5de90
WWW_DOCUMENT_ROOT=
WWW_GATEWAY_INTERFACE=CGI/1.1
WWW_GATEWAY_EOF=$Z-26EAB4B5C9D4E5F2551B6CCB-
WWW_GATEWAY_EOT=$D-F8476D90DF530C511971F9DE-
WWW_GATEWAY_ESC=$E-23D35CC7C8BE665CD206A3AD-
WWW_GATEWAY_MRS=16492
WWW_HTTP_ACCEPT=*/*
WWW_HTTP_USER_AGENT=Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
WWW_HTTP_ACCEPT_ENCODING=gzip, br, zstd, deflate
WWW_HTTP_HOST=wasd.vsm.com.au
WWW_PATH_INFO=
WWW_PATH_TRANSLATED=
WWW_QUERY_STRING=
WWW_REMOTE_ADDR=3.138.116.228
WWW_REMOTE_HOST=ec2-3-138-116-228.us-east-2.compute.amazonaws.com
WWW_REMOTE_PORT=32675
WWW_REMOTE_USER=
WWW_REQUEST_METHOD=GET
WWW_REQUEST_PROTOCOL=HTTP/2
WWW_REQUEST_SCHEME=https:
WWW_REQUEST_TIME_GMT=Thu, 31 Oct 2024 23:53:53 GMT
WWW_REQUEST_TIME_LOCAL=Fri, 01 Nov 2024 10:23:53
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=119.252.17.13
WWW_SERVER_CHARSET=ISO-8859-1
WWW_SERVER_GMT=+10:30
WWW_SERVER_NAME=wasd.vsm.com.au
WWW_SERVER_PROTOCOL=HTTP/1.1
WWW_SERVER_PORT=443
WWW_SERVER_SIGNATURE=
WASD/12.2.5 Server at wasd.vsm.com.au Port 443
WWW_SERVER_SOFTWARE=HTTPd-WASD/12.2.5 OpenVMS/IA64 SSL
WWW_UNIQUE_ID=31bbcae8f4f0bc8b5f3
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 __x86_64
[0033] # define HTTPD_ARCH "X86"
[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] ulong HttpdVersionNumber;
[0052]
[0053] char BuildDateTime [] = BUILD_DATETIME,
[0054] BuildInfo [64],
[0055] HttpdName [] = HTTPD_NAME,
[0056] HttpdSoftwareIdName [] = HTTPD_SOFTWAREID_NAME,
[0057] HttpdVersion [] = HTTPD_VERSION,
[0058] SoftwareID [128];
[0059]
[0060] /********************/
[0061] /* external storage */
[0062] /********************/
[0063]
[0064] extern char HttpdSesola[];
[0065]
[0066] /*****************************************************************************/
[0067] /*
[0068] */
[0069]
[0070] VersionInfo ()
[0071]
[0072] {
[0073] char *cptr, *sptr;
[0074]
[0075] /*********/
[0076] /* begin */
[0077] /*********/
[0078]
[0079] /* server version as "11.10.9" into 111,009 */
[0080] sptr = HttpdVersion;
[0081] HttpdVersionNumber = atoi(sptr) * 10000;
[0082] while (isdigit(*sptr)) sptr++;
[0083] if (*sptr == '.') sptr++;
[0084] HttpdVersionNumber += atoi(sptr) * 100;
[0085] while (isdigit(*sptr)) sptr++;
[0086] if (*sptr == '.') sptr++;
[0087] HttpdVersionNumber += atoi(sptr);
[0088]
[0089] /* software ID can be specified on the command line! */
[0090] if (!SoftwareID[0])
[0091] sprintf (SoftwareID, "%s/%s OpenVMS/%s%s",
[0092] HttpdSoftwareIdName, HttpdVersion, HTTPD_ARCH, HttpdSesola);
[0093]
[0094] sprintf (BuildInfo, "%s VMS %s DECC %d%s",
[0095] BUILD_DATETIME, __VMS_VERSION+1, __DECC_VER,
[0096] OPERATE_WITH_SYSPRV ? " [/SYSPRV]" : "");
[0097]
[0098] /* compress white-space */
[0099] cptr = sptr = BuildInfo;
[0100] while (*cptr)
[0101] {
[0102] if (*cptr == ' ')
[0103] {
[0104] *sptr++ = *cptr++;
[0105] while (*cptr == ' ') cptr++;
[0106] }
[0107] else
[0108] *sptr++ = *cptr++;
[0109] }
[0110] *sptr = '\0';
[0111] }
[0112]
[0113] /*****************************************************************************/
[0114]