Index

&, form data encoding
HTML Form Data

+, encoded spaces
Accepting User Input From URLs and Other Sources

=
encoding for ISINDEX queries
Sending Command-line Arguments to Your CGI Program
form data encoding
HTML Form Data

access authorization
Environment Variables and Their Formats

accessing environment variables
Accessing Environment Variables

activating CGI file types
Activating CGI as a File Type for Parts of the Server

AddLog directive
How the Server Handles Client Requests

Archie, CGI and
CGI Basics

auth-type
AuthTrans

auth-user
AuthTrans

AUTH_TYPE
Environment Variables and Their Formats

authorization
steps for
AuthTrans

authorization translation
described
How the Server Handles Client Requests

AuthTrans
functions and
AuthTrans

Bourne shell
accessing environment variables
Using the Bourne Shell (/bin/sh)

buffer.h, described
The NSAPI Header Files
The NSAPI Header Files

C and C++
accessing environment variables
Using C or C++

C files
directories of
Programming Custom Functions

C shell
accessing environment variables
Using the C Shell

CGI
activating
Activating CGI as a File Type for Parts of the Server
configuring the server to use
Configuring Your Server to Use CGI Programs
defined
CGI Basics
development tips
Tips for Developing CGI Programs
directories, specifying
Specifying a CGI Directory
file type, activating
Specifying a CGI Directory
MIME types
Accessing CGI Programs with URLs
process, defined
The CGI Request Process in Detail
relationship to server
CGI Basics
request process overview
The CGI Request Process in Detail
security concerns
Security Concerns with CGI
servers and
The Server Creates the CGI Process
URLs and
Embedding Information in URLs
user input and
Accepting User Input From URLs and Other Sources

CGI headers
generic
CGI Generic Headers
status codes in
CGI Specific Headers

CGI process
decoding ISINDEX data
Input to an ISINDEX Search Dialog

CGI process
defined
The CGI Request Process in Detail
described
The Server Creates the CGI Process
environment variables and
The Process Assigns Variables and Opens Data Paths

CGI program
responses and
The CGI Program Sends the Response to the Client

CGI program in ANSI C
A Sample CGI Program in ANSI C

CGI program in Perl
A Sample CGI Program in perl

CGI program output
Sample Program Output

CGI programs
file access with extra path information
Embedding Information in URLs
form data
HTML Form Data
images and
ISMAP or Imagemaps
output and
Sending Output from CGI Programs
sample output
Sample Program Output
starting with command-line arguments
Sending Command-line Arguments to Your CGI Program

CGI request
clients and
The Client Sends the Request
defined
The Server Creates the CGI Process

CGI shell script sample
A sample CGI Shell Script

CGI specific headers
CGI Specific Headers

cgi tag
Customize Server-parsed HTML

cgi-bin directory
Accessing CGI Programs with URLs

characters
escaped
Accepting User Input From URLs and Other Sources

cinfo.h, described
The NSAPI Header Files
The NSAPI Header Files

class
defined
What are Server Application Functions?
ObjectType functions
ObjectType
PathCheck functions
PathCheck
service functions
Service

classes
functions and
Conditions for Each Function Class
functions passing data among
AuthTrans

client data
getting name=value pairs
Public Functions

client requests
server handling process
How the Server Handles Client Requests

clients
accessing CGI programs
The CGI Request Process in Detail
CGI and
The Client Sends the Request
getting DNS names for
Data Structures and Data Access Functions
getting IP addresses for
Data Structures and Data Access Functions
getting name=value information for
Public Functions
HTTP headers in variables
Data Structures and Data Access Functions
sending information to CGI
Using Standard Input to Get Information
sessions and
Data Structures and Data Access Functions

cmd tag
Customize Server-parsed HTML

code samples
directories of
Programming Custom Functions

code, compiling
Compiling Your Code

command-line arguments
Data the Server Sends to the CGI Program
sending to CGI programs
Sending Command-line Arguments to Your CGI Program

Common Gateway Interface See CGI
CGI Basics

compiling options
Compiling Your Code

computer requirements
Conventions Used in This Guide

config tag
Customize Server-parsed HTML

Content-encoding
CGI Generic Headers

Content-length
CGI Generic Headers

Content-type
CGI Generic Headers

CONTENT_LENGTH
Environment Variables and Their Formats

CONTENT_TYPE
Environment Variables and Their Formats

creating functions
described
What is the NSAPI?
overview
What is the NSAPI?

custom functions
classes for
AuthTrans
loading
Loading Your Shared Object
using
Using Your Custom Functions

daemon.h, described
The NSAPI Header Files
The NSAPI Header Files

data
sending to client from CGI program
Sending Output from CGI Programs

data structures
parameter blocks and
Data Structures
passing data with
Data Structures
session variables for
Data Structures and Data Access Functions

DATE_GMT variable
Special Variables for Parsing

DATE_LOCAL variable
Special Variables for Parsing

decoding
automatically with ISINDEX
Sending Command-line Arguments to Your CGI Program

default query handler
Setting up a Default Query Handler

developing CGI, tips for
Tips for Developing CGI Programs

directives
function classes and
What are Server Application Functions?
Conditions for Each Function Class
functions and
What is the NSAPI?
order in configuration files
How the Server Handles Client Requests

directories
security and
Security Concerns with CGI
specifying CGI
Specifying a CGI Directory

DNS names
getting clients
Data Structures and Data Access Functions

DOCUMENT_NAME variable
Special Variables for Parsing

DOCUMENT_URI variable
Special Variables for Parsing

documents
variable for client request
Data Structures and Data Access Functions

echo tag
Customize Server-parsed HTML

encoding
form data and
HTML Form Data
URLs and
Accepting User Input From URLs and Other Sources

environment variables
Data the Server Sends to the CGI Program
accessing
Accessing Environment Variables
AUTH_TYPE
Environment Variables and Their Formats
CONTENT_LENGTH
Environment Variables and Their Formats
CONTENT_TYPE
Environment Variables and Their Formats
formats of
Environment Variables and Their Formats
GATEWAY_INTERFACE
Environment Variables and Their Formats
HTTP_ACCEPT
HTTP Headers as Environment Variables
HTTP_FROM
HTTP Headers as Environment Variables
HTTP_IF_MODIFIED_SINCE
HTTP_IF_MODIFIED_SINCE
HTTP Headers as Environment Variables
HTTP_USER_AGENT
HTTP Headers as Environment Variables
HTTPS
Secure Server Variable Formats
HTTPS_KEYSIZE
Secure Server Variable Formats
HTTPS_SECRETKEYSIZE
Secure Server Variable Formats
PATH_INFO
Environment Variables and Their Formats
PATH_TRANSLATED
Environment Variables and Their Formats
QUERY_STRING
Environment Variables and Their Formats
REMOTE_ADDR
Environment Variables and Their Formats
REMOTE_HOST
Environment Variables and Their Formats
REMOTE_USER
Environment Variables and Their Formats
REQUEST_METHOD
Environment Variables and Their Formats
SCRIPT_NAME
Environment Variables and Their Formats
SERVER_NAME
Environment Variables and Their Formats
SERVER_PORT
Environment Variables and Their Formats
SERVER_PROTOCOL
Environment Variables and Their Formats
SERVER_SOFTWARE
Environment Variables and Their Formats
SERVER_URL
Environment Variables and Their Formats

ereport.h, described
The NSAPI Header Files
The NSAPI Header Files

errmsg tag
Customize Server-parsed HTML

error directive
How the Server Handles Client Requests

errors
reporting
Reporting Errors to the Server
reporting to log files
Error Reporting
setting response codes
Reporting Errors to the Server

escaped characters
Accepting User Input From URLs and Other Sources

etc/passwd file, accessing with CGI
Accessing CGI Programs with URLs

exec tag
Customize Server-parsed HTML

Expires
CGI Generic Headers

extra path information
in URLs
Embedding Information in URLs

file tag
Customize Server-parsed HTML

file.h, described
The NSAPI Header Files
The NSAPI Header Files

flastmod tag
Customize Server-parsed HTML

form data
CGI and
Accepting User Input From URLs and Other Sources
encoding
HTML Form Data
format of
HTML Form Data
sending to CGI program
HTML Form Data

form elements
data passed to CGI
HTML Form Data

forms
data sent to CGI
HTML Form Data

fsize tag
Customize Server-parsed HTML

functions
classes for
Conditions for Each Function Class
configuration files and
What are Server Application Functions?
creating for specific classes
Conditions for Each Function Class
directives and
What is the NSAPI?
handling data with pblocks
Getting Data From the Server: the Parameter Block
header files for
The NSAPI Header Files
initialization
Initialization Functions
loading in magnus.conf
Loading Your Shared Object
name=value pairs and
Public Functions
NameTrans class
NameTrans
param_create
Public Functions
param_free
Public Functions
passing data between classes of
AuthTrans
passing parameters among
Passing Parameters to Server Application Functions
pblock_create
Public Functions
pblock_find
Public Functions
pblock_findval
Public Functions
pblock_free
Public Functions
pblock_nvinsert
Public Functions
pblock_pblock2str
Public Functions
pblock_pinsert
Public Functions
pblock_remove
Public Functions
pblock_str2pblock
Public Functions
reporting errors in
Reporting Errors to the Server
request_header
Data Structures and Data Access Functions
responses for
What are Server Application Functions?
return codes
Application Function Return Codes
return values and
What are Server Application Functions?
used with directives
What are Server Application Functions?
using in obj.conf
Using Your Custom Functions

gateway
defined
CGI Basics

GATEWAY_INTERFACE
Environment Variables and Their Formats

GET
Environment Variables and Their Formats

GET method
HTML Form Data
sample of
A More Detailed perl Example

header files
described
The NSAPI Header Files
directories of
Programming Custom Functions

headers
variables for
Data Structures and Data Access Functions

hostname
CGI and
The Server Creates the CGI Process

HP-UX, compiling for
Compiling Your Code

HTTP headers
HTTP Headers as Environment Variables
described
CGI Generic Headers

HTTP protocol
methods and
Environment Variables and Their Formats

HTTP_ACCEPT
HTTP Headers as Environment Variables

HTTP_FROM
HTTP Headers as Environment Variables

HTTP_USER_AGENT
HTTP Headers as Environment Variables

httpd.lib
Compiling Your Code

HTTPS environment variable
Secure Server Variable Formats

HTTPS_KEYSIZE
Secure Server Variable Formats

HTTPS_SECRETKEYSIZE
Secure Server Variable Formats

imagemaps
ISMAP or Imagemaps

images, coordinates sent to CGI
ISMAP or Imagemaps

include tag
Customize Server-parsed HTML

includes, server side
Customize Server-parsed HTML

information
getting from clients
Accepting User Input From URLs and Other Sources
sending to server
Using Standard Input to Get Information

Init functions
Initialization Functions

initialization functions
What are Server Application Functions?
Initialization Functions

IP address
CGI and
The Server Creates the CGI Process
getting clients
Data Structures and Data Access Functions

IRIX, compiling for
Compiling Your Code

ISINDEX
Setting up a Default Query Handler
HTML Form Data
automatic decoding
Input to an ISINDEX Search Dialog
CGI and
Accepting User Input From URLs and Other Sources
passed as command-line arguments
Input to an ISINDEX Search Dialog
queries and
Sending Command-line Arguments to Your CGI Program

ISMAP
ISMAP or Imagemaps
CGI and
Accepting User Input From URLs and Other Sources

linking options
Compiling Your Code

Location
CGI Specific Headers

log file
reporting errors to
Error Reporting

log_error
Error Reporting

magnus.conf
custom functions in
Initialization Functions
loading shared objects
Loading Your Shared Object
server configuration, described
How the Server Handles Client Requests

makefile
Compiling Your Code

method
determining
Data Structures and Data Access Functions

methods
Environment Variables and Their Formats
POST
Environment Variables and Their Formats

MIME types
How the Server Handles Client Requests
CGI and
Accessing CGI Programs with URLs

name translation
described
How the Server Handles Client Requests

name=value pairs
HTML Form Data
creating
Public Functions
functions for handling
Public Functions
getting data in
Public Functions
pb_param structures and
Data Structures
removing
Public Functions

NameTrans
NameTrans
REQ values and
NameTrans

net.h, described
The NSAPI Header Files
The NSAPI Header Files

Netscape Application Programming Interface See NSAPI
Netscape API Functions

Netscape servers
NSAPI and
What is the NSAPI?
What Are CGI and the NSAPI?

netsite.h, described
The NSAPI Header Files
The NSAPI Header Files

nonparsed headers
defined
Bypassing the Server: Nonparsed Headers

nph- files (nonparsed headers), defined
Bypassing the Server: Nonparsed Headers

NSAPI
described
What is the NSAPI?
directories of files
Programming Custom Functions
servers use of
What is the NSAPI?
What Are CGI and the NSAPI?

obj.conf
servicing requests and
How the Server Handles Client Requests
using functions in
Using Your Custom Functions

object types
MIME and
How the Server Handles Client Requests

objects
servers and
How the Server Handles Client Requests
used to service client requests
How the Server Handles Client Requests

ObjectType
ObjectType

operating systems
compiling options and
Compiling Your Code

OSF/1, compiling for
Compiling Your Code

output
CGI and
The CGI Program Sends the Response to the Client
sending to client
Sending Output from CGI Programs

param_create function
Public Functions

param_free function
Public Functions

parameter block
described
Getting Data From the Server: the Parameter Block

parameters
passing
Passing Parameters to Server Application Functions

passing data to custom functions
Public Functions

passing parameters to functions
Passing Parameters to Server Application Functions

path checks
described
How the Server Handles Client Requests

path translation
Embedding Information in URLs

PATH_INFO
Environment Variables and Their Formats

PATH_TRANSLATED
Environment Variables and Their Formats

PathCheck
PathCheck

pb_entry structure
creating linked lists with
Data Structures
creating pb_param structures
Data Structures

pb_param structures
name=value pairs and
Data Structures

pblock
Getting Data From the Server: the Parameter Block
accessing information using request_header
Data Structures and Data Access Functions

pblock.h, described
The NSAPI Header Files

pblock_create function
Public Functions

pblock_find function
Public Functions

pblock_findval function
Public Functions

pblock_free function
Public Functions

pblock_nvinsert function
Public Functions

pblock_pblock2str function
Public Functions

pblock_pinsert function
Public Functions

pblock_remove function
Public Functions

pblock_str2pblock function
Public Functions

pblocks
creating
Public Functions
removing
Public Functions

Perl
accessing environment variables
Using Perl

port number
request and
Environment Variables and Their Formats

POST method
HTML Form Data
sample of
A More Detailed perl Example

processes
CGI and
The Server Creates the CGI Process

Prospero
CGI and
CGI Basics

protocol
client and
Data Structures and Data Access Functions

protocol-related response headers
Bypassing the Server: Nonparsed Headers

PROTOCOL_SERVER_ERROR
Reporting Errors to the Server

protocol_start_response
Service

protocol_status
Reporting Errors to the Server

prototype for server application functions
Passing Parameters to Server Application Functions

queries
ISINDEX and
Sending Command-line Arguments to Your CGI Program

query handlers
Setting up a Default Query Handler

query string
defined
Embedding Information in URLs

QUERY_STRING
HTML Form Data

QUERY_STRING_UNESCAPED variable
Special Variables for Parsing

REMOTE_ADDR
Environment Variables and Their Formats

REMOTE_HOST
Environment Variables and Their Formats

REMOTE_USER
Environment Variables and Their Formats

REQ_ABORTED
Application Function Return Codes
What are Server Application Functions?
Name Trans and
NameTrans
Service and
Service

REQ_EXIT
Application Function Return Codes
What are Server Application Functions?
Name Trans and
NameTrans
Service and
Service

REQ_NOACTION
Application Function Return Codes
What are Server Application Functions?
Name Trans and
NameTrans
Service and
Service

REQ_PROCEED
Application Function Return Codes
What are Server Application Functions?
NameTrans and
NameTrans
Service and
Service

request response process
How the Server Handles Client Requests

request variable
Data Structures and Data Access Functions

request variables
Data Structures and Data Access Functions

request_header
using to access pblocks
Data Structures and Data Access Functions

request_header function
Data Structures and Data Access Functions

REQUEST_METHOD
Environment Variables and Their Formats

requests
service directive
How the Server Handles Client Requests

response codes
setting
Reporting Errors to the Server

response process
Service

return codes
functions and
Application Function Return Codes

sample program output
Sample Program Output

samples
ANSI C
A Sample CGI Program in ANSI C
CGI in Perl
A Sample CGI Program in perl
CGI shell script
A sample CGI Shell Script
using GET
A More Detailed perl Example
using POST
A More Detailed perl Example

SCRIPT_NAME
Environment Variables and Their Formats

security
CGI problems with
Security Concerns with CGI

sem.h, described
The NSAPI Header Files

server
bypassing
Bypassing the Server: Nonparsed Headers
configuring for CGI
Configuring Your Server to Use CGI Programs
decoding information
Sending Command-line Arguments to Your CGI Program
host name of
Environment Variables and Their Formats
reporting errors to
Reporting Errors to the Server
URL for
Environment Variables and Their Formats
version of
Environment Variables and Their Formats

server application functions
classes for
What are Server Application Functions?
defined
What are Server Application Functions?
prototype for
Passing Parameters to Server Application Functions

Server Manager
CGI and
Configuring Your Server to Use CGI Programs

server processes, CGI and
The Server Creates the CGI Process

server-parsed HTML
Customize Server-parsed HTML
tags for
Customize Server-parsed HTML

server-side includes
Customize Server-parsed HTML

SERVER_NAME
Environment Variables and Their Formats

SERVER_PORT
Environment Variables and Their Formats

SERVER_PROTOCOL
Environment Variables and Their Formats

SERVER_SOFTWARE
Environment Variables and Their Formats

SERVER_URL
Environment Variables and Their Formats

servers
CGI and
The Server Creates the CGI Process
computer requirements for
Conventions Used in This Guide
customizing
What is the NSAPI?
What Are CGI and the NSAPI?
objects and
How the Server Handles Client Requests
variables for
Data Structures and Data Access Functions

Service
Service

service directive
described
How the Server Handles Client Requests

session
defined
Data Structures and Data Access Functions

session variables
server variables
Data Structures and Data Access Functions

session.h, described
The NSAPI Header Files

sessions
method used during
Data Structures and Data Access Functions

setting response codes
Reporting Errors to the Server

shared objects
described
Loading Your Shared Object
loading
Loading Your Shared Object

shexp.h, described
The NSAPI Header Files

signatures
adding to files
Add Signatures (Trailers) to Files

sizefmt tag
Customize Server-parsed HTML

Solaris, compiling for
Compiling Your Code

spaces, + as encoded
Accepting User Input From URLs and Other Sources

splitting strings
C sample
A Sample CGI Program in ANSI C

standard input
Data the Server Sends to the CGI Program
Using Standard Input to Get Information

Status
CGI Specific Headers

status codes
Reporting Errors to the Server
described
CGI Specific Headers
list of
CGI Specific Headers

strings
adding to pblocks
Public Functions
getting from pblocks
Public Functions

SunOS, compiling for
Compiling Your Code

systems.h, described
The NSAPI Header Files

tags
server-parsed HTML
Customize Server-parsed HTML

timefmt tag
Customize Server-parsed HTML

tips for developing CGI
Tips for Developing CGI Programs

trailers
adding to files
Add Signatures (Trailers) to Files

URI
variable for
Data Structures and Data Access Functions

URL decoding
C sample code
A Sample CGI Program in ANSI C
example code in C
A Sample CGI Program in ANSI C
example in Perl
A More Detailed perl Example

URL encoding
Accepting User Input From URLs and Other Sources

URLs
CGI and
Accessing CGI Programs with URLs
CGI information in
Embedding Information in URLs
embedding information in
Embedding Information in URLs
encoding
Accepting User Input From URLs and Other Sources
translated to file paths
How the Server Handles Client Requests

user authorization process
AuthTrans

util.h, described
The NSAPI Header Files

variables
client headers
Data Structures and Data Access Functions
pb_param structures and
Data Structures
protocol
Data Structures and Data Access Functions
request information in
Data Structures and Data Access Functions
servers
Data Structures and Data Access Functions
URI
Data Structures and Data Access Functions

virtual path
defined
Embedding Information in URLs

virtual tag
Customize Server-parsed HTML

WAIS
CGI and
CGI Basics

Windows NT, compiling for
Compiling Your Code