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