*) Fixed an unintentional sign extension during promotion in Java's
[catagits/fcgi2.git] / README
CommitLineData
0198fd3c 1FastCGI Developer's Kit README
2------------------------------
3
4 Version 2.0b2, 04 April 1997
6518a3ef 5 $Id: README,v 1.9 1999/07/29 13:37:06 roberts Exp $
0198fd3c 6 Copyright (c) 1996 Open Market, Inc.
7 See the file "LICENSE.TERMS" for information on usage and redistribution
8 of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9
10Basic Directions
11----------------
12
13Open the kit's index page, index.html in this directory, using the
14"Open File" command in your Web browser. The index page gives you an
15overview of the kit structure and helps you navigate the kit. The
16index page also contains links that run some example applications, but
17the applications won't work when index.html is opened using the "Open
18File" command because they aren't being accessed through a Web server.
19
20For further instructions see the FastCGI Developer's Kit
21document, accessible via the index page.
22
23
24TODO:
25----
26The following is a small list of what should be available in the final
27release of the FDK.
fbf75401 28 1. Fix all compilation problems on all Unixes and NT.
0198fd3c 29 2. Provide perl.c for perl5.003 (replace run() with runops())
30 3. Provide latest Tcl patches (NT requires Tcl7.5+)
31 4. Provide FCGI_VERSION directive for automatic version recognition.
32-- if available
33 5. Provide new Java interface to conform to JDK1.1.1 (due to final
34 System.in)
35 6. Provide samples of Perl on NT.
fbf75401 36
ac8a58ac 37
38Changes with devkit 2.1.1
39-------------------------
f6d1be39 40
6518a3ef 41 *) Fixed an unintentional sign extension during promotion in Java's
42 FCGIInputStream.read(). Takayuki Tachikawa <tachi@po.ntts.co.jp>
43
3293ebdf 44 *) Cleaned up warnings in examples (mostly main() complaints).
45
da7d42b2 46 *) Removed examples/tiny-cgi.c (it wasn't a FastCGI application?!).
47
283822e9 48 *) Remove some debugging code and clean up some gcc warnings in cgi-fcgi.c.
49
5a7cc494 50 *) Add multithread support to the fcgiapp lib and an example multithreaded
6518a3ef 51 application, threaded.c. Based on work by Dennis Payne
5a7cc494 52 <dpayne@softscape.com> and Gene Sokolov <hook@aktrad.ru>.
53
fbf75401 54 *) Remove the printf() and #include of stdio.h from examples/echo2.c.
55
f6d1be39 56 *) Remove the static initialization of _fcgi_sF[] because on glibc 2.x based
fbf75401 57 systems stdin/stdout/stderr are no longer static.
58
ac8a58ac 59 *) Flush FastCGI buffers at application exit. <eichin@fastengines.com>
fbf75401 60
ac8a58ac 61 << INSERT OTHER STUFF HERE >>
fbf75401 62
0198fd3c 63
64What's New: Version 2.0b2, 04 April 1997
65--------------------------------------
66
67Some additional bug fixes, mostly on NT port. The following list
68of the bugs that have been and fixed:
69 1. Updated build_no_shell.bat to create a FcgiBin directory under the
70 top level of the FastCGI kit and copy all executables and the
71 FastCGI dll there. This makes it easier to use.
fbf75401 72 2. Corrected the Unix version of OS_SpawnChild so that it didn't close
0198fd3c 73 the listenFd when forking off child processes. This code would
74 affect the cgi-fcgi application on Unix. The problem is that it
75 could only start one fastcgi process. Any other processes would not
76 get the listen file descriptor and they would die.
77 3. Corrected cgi-fcgi.c so that it properly handled large posts. The
78 bug was introduced with the asynchronous I/O model implemented for
79 the Windows NT port. The problem was not clearing a bit indicating
80 that a read had completed. This caused the application to stall.
81 4. Corrected OS_DoIo, the function used for scheduling I/O for cgi-fcgi.
fbf75401 82 It had a bug where it wasn't creating a copy of the file descriptors
83 used for I/O. This would cause the master list of FDs to watch to be
0198fd3c 84 reset and thus would hang the application because we would no longer
85 watch for I/O on those file descriptors. (This problem was specific to
86 Unix and only happened with the cgi-fcgi application.)
87 5. Cleaned up several compilation warnings present on OSF.
fbf75401 88
0198fd3c 89
90What's New: Version 2.0b1, 24 March 1997
91--------------------------------------
92
93This "beta" release adds the functionality of "cgi-fcgi" to the
94Windows NT platform and allows for creation of FastCGI applications
fbf75401 95running in Win32 environment. There is almost no new documentation
0198fd3c 96provided, but will become part of this kit in the official release.
97 1. Added FastCGI libraries running on Windows NT 3.51+
98 2. Rename errno to FCGI_errno in the FCGX_Stream, which was causing
99 problems on some Linux platforms and NT.
100 3. Fixed a parenthesis problem in FCGI_gets
101
102
103What's New: Version 1.5.1, 12 December 1996
104--------------------------------------
105
106This release introduces mostly bug fixes, without any additional
fbf75401 107functionality to the kit.
0198fd3c 108 1. Conditional compilation for the hp-ux compiler.
109 2. Loop around the accept() call to eliminate "OS Error: Interrupted
110 System Call" message from appearing in the error logs.
fbf75401 111 3. Casting of the FCGI_Header to (char *), which eliminates the
0198fd3c 112 assertion failure "bufPtr->size>0".
fbf75401 113
0198fd3c 114
115What's New: Version 1.5, 12 June 1996
116--------------------------------------
117
118General:
119
120 Added a white paper on FastCGI application performance to the
121 doc directory. Generally brought the other docs up to date.
122
123 Rearranged the kit to put more emphasis on running FastCGI-capable
124 servers and less on running cgi-fcgi. Added
125 examples/conf/om-httpd.config, a config file that demonstrates all
126 of the example apps. (Would like to have similar configs for NCSA
127 and Apache.)
128
129 Added the tiny-authorizer and sample-store applications to
130 the examples. These are explained in the index.html.
131
132 In addition to everything else it does, sample-store demonstrates
133 a bug in the Open Market WebServer 2.0: When an Authorizer
134 application denies access, the server tacks some extra junk onto
135 the end of the page the application returns. A little ugly but
136 not fatal.
137
138C libraries:
139
140 Added the functions FCGX_Finish and FCGI_Finish. These functions
141 finish the current request from the HTTP server but do not begin a
142 new request. These functions make it possible for applications to
143 perform other processing between requests. An application must not
144 use its stdin, stdout, stderr, or environ between calling
145 FCGI_Finish and calling FCGI_Accept. See doc/FCGI_Finish.3 for
146 more information. The application examples/sample-store.c demonstrates
147 the use of FCGI_Finish.
148
149 Added conditional 'extern "C"' stuff to the .h files fcgi_stdio.h,
150 fcgiapp.h, and fcgiappmisc.h for the benefit of C++ applications
151 (suggested by Jim McCarthy).
152
153 Fixed two bugs in FCGX_VFPrintF (reported by Ben Laurie). These
154 bugs affected processing of %f format specifiers and of all format
155 specifiers containing a precision spec (e.g "%12.4g").
156
157 Fixed a bug in FCGX_Accept in which the environment variable
158 FCGI_WEBSERVER_ADDRS was being read rather than the specified
159 FCGI_WEB_SERVER_ADDRS. Fixed a bug in FCGX_Accept in which the
160 wrong storage was freed when FCGI_WEB_SERVER_ADDRS contained more
161 than one address or if the address check failed.
162
163 Changed FCGX_Accept to avoid depending upon accept(2) returning the
164 correct value of sin_family in the socketaddr structure for an
165 AF_UNIX connection (SCO returns the wrong value, as reported by Paul
166 Mahoney).
167
168 Changed the error retry logic in FCGX_Accept. FCGX_Accept now
169 returns -1 only in case of operating system errors that occur while
170 accepting a connection (e.g. out of file descriptors). Other errors
171 cause the current connection to be dropped and a new connection to
172 be attempted.
173
174Perl:
175
176 Changed FCGI.xs to make it insensitive to Perl's treatment of
177 environ (we hope). Changed FCGI::accept so the initial environment
178 variables are not unset on the first call to FCGI::accept (or on
179 subsequent calls either). Added the echo-perl example
180 program. Added a workaround for the "empty initial environment bug"
181 to tiny-perl-fcgi. Changed the example Perl scripts to use a new
182 symbolic link ./perl, avoiding the HP-UX 32 character limit on the
183 first line of a command interpreter file.
184
185 Because the FastCGI-enabled Perl interpreter uses the C fcgi_stdio
186 library, it picks up all the changes listed above for C. There's
187 a new Perl subroutine FCGI::finish.
188
189Tcl:
190
191 Fixed a bug in tclFCGI.c that caused the request environment
192 variables to be lost. Changed FCGI_Accept so the initial
193 environment variables are not unset on the first call to FCGI_Accept
194 (or on subsequent calls either). Added the echo-tcl example
195 program. Fixed another bug that caused Tcl to become confused by
196 file opens; as a side effect of this change, writes to stdout/stderr
197 that occur in an app running as FastCGI before FCGI_Accept is called
198 are no-ops rather than crashing Tcl. Changed the example Tcl
199 scripts to use a new symbolic link ./tclsh, avoiding the HP-UX 32
200 character limit on the first line of a command interpreter file.
201
202 Because the FastCGI-enabled Tcl interpreter uses the C fcgi_stdio
203 library, it picks up all the changes listed above for C; there's
204 a new Tcl command FCGI_Finish.
205
206Java:
207
208 Fixed a sign-extension bug in FCGIMessage.java that caused bad encodings
209 of names and values in name-value pairs for lengths in [128..255].
210 Made small cleanups in the Java example programs to make them more
211 consistent with the other examples.
212
213
214
215What's New: Version 1.4, 10 May 1996
216--------------------------------------
217
218Includes Java classes and Java examples.
219
220
221
222What's New: Version 1.3.1, 6 May 1996
223--------------------------------------
224
225New, simplified, license terms. Includes an expanded whitepaper that
226describes FastCGI support in Open Market's Secure WebServer 2.0.
227Includes Open Market FastCGI 1.0 Programmer's Guide. Includes
228"FastCGI: A High-Performance Gateway Interface", a position paper
229presented at the workshop "Programming the Web - a search for APIs",
230Fifth International World Wide Web Conference, 6 May 1996, Paris,
231France.
232
233
234
235What's New: Version 1.3, 29 April 1996
236--------------------------------------
237
238First public release; new license terms on all files.
239
240Changed cgi-fcgi.c to use SO_REUSEADDR when creating the listening socket;
241this avoids the need to wait through the TIME_WAIT state on all the TCP
242connections made by the previous instance of an external application
fbf75401 243you are restarting.
0198fd3c 244
245
246
247What's New: Version 1.2.2, 15 April 1996
248----------------------------------------
249
250Partially fixed a bug in Perl's FCGI::accept (source file FCGI.xs).
251The per-request environment variables were being lost. Now the
252per-request environment variables show up correctly, except that if
253the Perl application has an empty initial environment, the environment
254variables associated with the *first* request are lost. Therefore,
255when starting Perl, always set some environment variable using the
256AppClass -initial-env option, or by running cgi-fcgi in a non-empty
257environment.
258
259
260
261What's New: Version 1.2.1, 22 March 1996
262----------------------------------------
263
264Fixed a bug in FCGI_Accept. If your application running as FastCGI
265opened a file before calling FCGI_Accept, it would decide that it
266was really running as CGI. Things went downhill quickly after that!
267
268Also added advisory locking to serialize calls to accept on shared
269listening sockets on Solaris and IRIX, to work around problems
270with concurrent accept calls on these platforms.
271
272
273
274What's New: Version 1.2, 20 March 1996
275--------------------------------------
276
2771. This version of the kit implements the most recent draft
278of the protocol spec. Enhancements to the protocol include
279a BEGIN_REQUEST record that simplifies request ID management
280and transmits role and keep-alive information, and a simplified
281end-of-stream indication.
282
283The protocol spec has been revised to describe exactly what's
284been implemented, leaving out the features that we hope to
285introduce in later releases.
286
287At the application level, the visible change is the FCGI_ROLE
288variable that's available to applications. This allows an application
289to check that it has been invoked in the expected role. A single
290application can be written to respond in several roles. The
291FCGI_Accept.3 manpage contains more information.
292
2932. We introduced the new "module" prefix FCGX in order to simplify
294the relationship between fcgi_stdio and fcgiapp.
295
296A growing number of functions are provided in both fcgi_stdio and
297fcgiapp versions. Rather than inventing an ad hoc solution for each
298naming conflict (as we did with FCGI_accept and FCGI_Accept), we've
299bitten the bullet and systematically renamed *all* the fcgapp
300primitives with the prefix FCGX_. In fcgi_stdio, we've renamed
301FCGI_accept to FCGI_Accept. So all functions that are common in the
302two libraries have the same name modulo the different prefixes.
303
304The Accept function visible in Tcl is now called FCGI_Accept, not
305FCGI_accept.
306
307The Accept function visible in Perl is now FCGI::accept. All
308lower case names for functions and all upper case names for
309modules appears to be a Perl convention, so we conform.
310
3113. The kit now fully supports the Responder, Authorizer,
312and Filter roles.
313
314The Filter role required a new function, FCGI_StartFilterData.
315FCGI_StartFilterData changes the input stream from reading
316FCGI_STDIN data to reading FCGI_DATA data. The manpage
317gives full details.
318
319Another new function, FCGI_SetExitStatus, is primarily for
320the Responder role but is available to all. FCGI_SetExitStatus
321allows an application to set a nonzero "exit" status
322before completing a request and calling FCGI_Accept again.
323The manpage gives full details.
324
325These two new functions are provided at both the fcgi_stdio interface
326and the basic fcgiapp interface. Naturally, the fcgiapp versions are
327called FCGX_StartFilterData and FCGX_SetExitStatus.
328
3294. The fcgiapp interface changed slightly in order to treat
330the streams and environment data more symmetrically.
331
332FCGX_Accept now returns an environment pointer, rather than requiring
333a call to FCGX_GetAllParams to retrieve an environment pointer.
334FCGX_GetParam takes an explicit environment pointer argument.
335FCGX_GetAllParams is eliminated. See the documentation in the header
336file for complete information.
337
338fcgiapp also added the procedure FCGX_IsCGI, providing a standardized
339test of whether the app was started as CGI or FastCGI.
340
3415. We've ported the kits to vendor-supported ANSI C compilers
342on Sun (Solaris 2.X), HP, and Digital platforms. GCC can be
343selected on these platforms by performing SETENV CC gcc before
344running configure.
345
346
347
348What's New: Version 1.1, 30 Jan 1996
349------------------------------------
350
3511. More platforms: Digital UNIX, IBM AIX, Silicon Graphics IRIX,
352Sun SunOS 4.1.4.
353
3542. Perl and Tcl: Simple recipes for producing Perl and Tcl
355interpreters that run as FastCGI applications. No source
356code changes are needed to Perl and Tcl. Documented
357in separate documents, accessible via the index page.
358
359
360
361Version 1.0, 10 Jan 1996
362------------------------