Conventions used in this book
JavaScript
Server plug-in API
Server plug-in API
Java and JavaScript Server APIs
The server creates the CGI process
The server assigns variables and opens data paths
The CGI program sends the response to the client
Security concerns about CGI
Accepting user input from URLs and other sources
Secure server variable formats
Sending command-line arguments to your CGI program
CGI generic headers
CGI-specific headers
Sample program output
Activating CGI as a file type for parts of the server
Setting up a default query handler
Customizing server-parsed HTML
A sample CGI program in Perl
A more detailed Perl example
A sample CGI program as a Java Applet
A sample CGI program in ANSI C
Details for each directive/step
Some new features in version 2.0
Caching
Software multihoming
Writing plug-in functions
Getting data from the server: the parameter block
Passing parameters to server application functions
Loading your shared object
Using your plug-in functions
condvar_notify base/crit.h 104
condvar_terminate base/crit.h 105
crit_terminate base/crit.h 107
daemon_atrestart netsite.h 107
filebuf_buf2sd base/buffer.h 108
filebuf_close base/buffer.h 108
filebuf_getc base/buffer.h 109
filebuf_open base/buffer.h 109
filebuf_open_nostat base/buffer.h 110
magnus_atrestart netsite.h 113
netbuf_buf2sd base/buffer.h 116
netbuf_close base/buffer.h 117
param_create base/pblock.h 118
pblock_create base/pblock.h 120
pblock_findval base/pblock.h 121
pblock_nninsert base/pblock.h 122
pblock_nvinsert base/pblock.h 123
pblock_pb2env base/pblock.h 124
pblock_pblock2str base/pblock.h 124
pblock_pinsert base/pblock.h 125
pblock_remove base/pblock.h 125
pblock_str2pblock base/pblock.h 126
protocol_dump822 frame/protocol.h 128
protocol_set_finfo frame/protocol.h 128
protocol_start_response frame/protocol.h 129
protocol_status frame/protocol.h 130
protocol_uri2url frame/protocol.h 131
protocol_uri2url_dynamic frame/protocol.h 131
request_create frame/req.h 133
request_header frame/req.h 133
request_stat_path frame/req.h 134
request_translate_uri frame/req.h 135
session_create base/session.h 137
session_free base/session.h 138
session_maxdns base/session.h 138
shexp_casecmp base/shexp.h 139
system_fopenRO base/file.h 145
system_fopenRW base/file.h 145
system_fopenWA base/file.h 146
system_fwrite_atomic base/file.h 147
system_localtime base/file.h 148
system_unix2local base/file.h 149
systhread_current base/systhr.h 150
systhread_getdata base/systhr.h 150
systhread_newkey base/systhr.h 151
systhread_setdata base/systhr.h 151
systhread_sleep base/systhr.h 152
systhread_start base/systhr.h 152
systhread_terminate base/systhr.h 152
systhread_timerset base/systhr.h 153
util_chdir2path base/util.h 154
util_env_create base/util.h 154
util_env_replace base/util.h 156
util_is_mozilla base/util.h 158
util_later_than base/util.h 159
util_sh_escape base/util.h 160
util_strcasecmp base/systems.h 162
util_strncasecmp base/systems.h 162
util_uri_escape base/util.h 163
util_uri_is_evil base/util.h 163
util_uri_parse base/util.h 164
util_uri_unescape base/util.h 164
util_vsnprintf base/util.h 164
Methods
Methods
The stat data structure
The shared memory structure shmem_s
The netbuf data structure
The filebuffer data structure
The cinfo data structure
The SYS_NETFD data structure
The SYS_FILE data structure
The SEMAPHORE data structure
The sockaddr_in data structure
The CONDVAR data structure
The CRITICAL data structure
The SYS_THREAD data structure
Port directive
User directive
MaxProcs directive
MinThreads directive
MaxThreads directive
ErrorLog directive
PidLog directive
LoadObjects directive
RootObject directive
Chroot directive
DNS directive
Security directive
ServerKey directive
ServerCert directive
Ciphers directive
Init directive
The admpw file