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