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