3 *) Fix the loadFactor calculation used to determine when dyanmic
4 applications could be killed off due to low demand [adsb@bigfoot.com].
6 *) Fix a deadlock condition that could occur with Win32 named
9 *) Fix a potential deadlock condition when FastCGI application
10 sent responses while still reading the client request (POST data).
14 *) Allow absolute pathnames in the -socket argument. Suggested by
15 Christian Jaeger [christian.jaeger@sl.ethz.ch].
17 *) Don't invoke suexec when the user/group for the fastcgi application
18 is the same as the apache main server. This is consistent with
19 apache's suexec handling. Suggested by Nikolaus Rath [Nikolaus@rath.org].
21 *) Reset the apache drop dead timer upon successful read or writes
22 to/from the client. This eliminates timeouts that were occuring
23 during the large file transfers to/from slow clients.
25 *) Support generic wrappers such as cgiwrap by eliminating dependencies
26 on Apache's SUEXEC, renaming the FastCgiSuexec directive
27 FastCgiWrapper and eliminating any checks regarding the target
28 application (this is the repsonibility of the wrapper).
30 *) Fix a nasty bug that occurred when a client aborted a POST request
31 before the connection to a dynamic FastCGI application was opened.
32 The application's lock file descriptor wasn't setup but was being
33 closed which resulted in FD0 being closed. Normally this is open to
34 /dev/null and should pose no problems except that because the FD
35 was available it was being returned by Apache's accept(). This
36 caused it to be registered for pool cleanup. mod_cgi though moves
37 the CGI stdin pipe to FD0 and thus it was getting waxed during pool
38 cleanup. Problem identified by checksum@163.net.
40 Changes with mod_fastcgi 2.2.8
42 *) Eliminate the concept of disabled applications. If a failure
43 occurs trying to setup an application (e.g. bind() error) its
44 tried repeatedly every init-start-delay seconds.
46 *) Tweak to Makefile.tmpl to support DSOs. Dave Hill [ddhill@zk3.dec.com]
48 Changes with mod_fastcgi 2.2.6
50 *) Shutdown the PM when Apache appears to have disappeared.
52 *) seteuid() tweak for HP-UX 11. Milton L. Hankins [mlh@swl.msd.ray.com]
54 *) (Win32) More dynamic fixes.
56 *) (Win32) Eliminate the per application named pipe mutex. Its now
57 per process to keep the lib happy (the use _FCGI_MUTEX_ should
58 removed from the lib). This allows pipe-based applications to
59 now handle multiple simoultanous requests (one per process).
61 *) Increase the number of open FDs we look to close when spawning apps.
63 *) Prevent an assert from popping unnecessarily.
65 *) (Win32) Add support for interpretter scripts.
67 *) (Win32) Fix named pipe handling (problems with large responses).
69 *) (Win32) Remove the "can exec" check.
71 Changes with mod_fastcgi 2.2.4
73 *) Beta WinNT support. David Allen [djallen@raleigh.ibm.com] and
74 Rob Saccoccio [robs@chelsea.net]
76 *) Remove request type restriction (GET and POST only) in order to support
77 Web DAV requests. Scott Robertson [sroberts@codeit.com]
79 *) Allow requests for URLs such as /server/some/other/qualifier to match a
80 FastCGI server defined as /server. This was done primarily for Java
81 Servlets, but is generically useful.
83 *) Change the comm between the PM and the request handlers from a regular
84 file to a pipe and an assortment of other dynamic fixes.
86 *) Log dynamic process termination scheduling and the resulting
87 process exit notification.
89 *) Change the default singleThreshhold from 10 to 0 to prevent the last dynamic
90 application process from being killed off due to low demand.
92 *) Clean up FastCGI application pathnames (e.g. remove duplicate slashes).
94 *) Fix bugs that prevented dynamic processes from being shutdown when
95 the load subsided. Lars Heete [heete@do.isst.fhg.de]
97 *) Prevent dynamic processes from being scheduled to be started before
98 the init-start-delay or restart-delay period expires. This prevents
99 the queuing of process start requests while an application which has
100 a long initialization period starts up.
102 *) When suexec is enabled, allow the process manager to become root again in
103 order to signal applications it spawned.
105 *) Change the "server started" log message level from INFO to WARN.
107 *) Fix dynamic server "Connection Refused" handling.
109 *) Fix demand-based dynamic process spawing (uses a more portable approach).
111 *) Add -idle-timeout arg to FastCgiServer, FastCgiExternalServer, and
112 FastCgiConfig. mod_fastcgi will now abort a connection if inactive for
113 longer than this period. It applies to the initiation of connections as
114 well (and thus is similar to appConnTimeout). Default is 30 seconds.
116 *) appConnTimeout is 0 by default now resulting in blocking connect()s. This
117 is more platform portable/predicable.
119 *) Leave STDOUT and STDERR open to the main server error_log. This should
120 eliminate a pile of protocol errors and having to track down 3rd party
121 libs writing to stderr inadvertantly. This doesn't mean these shouldn't
122 be fixed in the application to use the FastCGI I/O, it just allows these
123 applications to run when previously they'd crash and burn.
125 *) Add the pass-header arg to server directives.
127 *) Allow supplementary groups to be passed to spawned FastCGI applications (as
128 is done for CGI) - at least until PR2580 is resolved.
130 *) Initialize the default (empty) environment in a more socially acceptable
133 *) Miscellaneous doc improvements based on notes I've collected up over the
136 *) Fix a bug in the stderr handling introduced in 2.2.2. There were conditions
137 that resulted in not or improperly terminated strings.
139 *) Fix the call to setsockopt() to disable Nagle. [based on a bug report by
140 Johannes Plassmann <johannes.plassmann@pdb.siemens.de>]
142 Changes with mod_fastcgi 2.2.2
144 *) Added support for blocking connect()s by setting appConnTimeout to 0.
145 Non-blocking connect()s (the default) can be troublesome on some platforms.
146 Its expected that blocking connect()s will become the default (and
147 non-blocking connect()s will become optional) in the next release.
149 *) Dump a compile time error if the version of Apache is too old.
151 *) Wrap the SIGPIPE handler manipulation code such that it is only applicable
152 to Apache releases prior to 1.3.6.
154 *) Minor tweaks for RUSSIAN_APACHE. [Sergey Gershtein <sg@mplik.ru>]
158 Always restart a failed dynamic application if it is the last instance.
159 This means there once started there will always be at least one process
160 instance of a dynamic application.
162 Send PLEASE_START to the PM when a connect() results in an ECONNREFUSED.
163 ECONNREFUSED means the listen queue is full (or there isn't one). Asking
164 the PM to start (another) application instance may help empty it faster.
166 Change two sleep() calls to select() based snoozes because alarm() is in
167 effect and sleep() and alarm() don't always play nice together.
169 Fixed a couple of error messages.
171 *) Fix -listen-queue-depth arg on FastCgiConfig (dynamic). Previously it
172 was ignored and the default was always used.
174 *) Allow the -initial-env argument to be used to pass variables from the
175 Apache process environment to the FastCGI server (by specifying a
176 variable name without the "=" or a value). [suggested by
177 Martin Lichtin <lichtin@oanda.com>]
179 *) Cleanup some debug macros.
181 *) Improved script stderr handling. [based on suggestions by
182 David Birnbaum <davidb@chelsea.net>]
184 *) Added IRIX and FreeBSD to the list of supported platforms and other minor
185 updates to the INSTALL doc.
187 *) Changed the default listen-queue-depth (FCGI_DEFAULT_LISTEN_Q) from
188 5 to 100. Its still configurable with the -listen-queue-depth option.
189 This should help eliminate the FAQ - Why do I see "Connection Refused"
192 *) Fix a bug in FastCgiExternalServer that broke support for external servers
193 on other hosts. [Dave Neuer <dneuer@futuristics.net>]
195 Changes with mod_fastcgi 2.2.1
197 *) Updates to the INSTALL doc to describe building as a DSO.
199 *) If the FastCgiIpcDir directive was in use and "httpd -t" was issued while
200 Apache was running ("apachectl restart" does this), the contents of the
201 dynamic directory (dynamic sockets and the mbox) would be blown away
204 *) Add an extern declaration for ap_sys_siglist (its exposed but not in any
205 Apache header file) to prevent a compile error on systems without
208 *) During auth requests, the subprocess_env table was left holding variables
209 sent to the auth FastCGI server (including REMOTE_PASSWD!) which means they
210 were passed to other processing phases (such as CGI/FastCGI). The
211 subprocess_env is now restored to its pre-auth condition.
213 *) Added a FastCGI Authorizer Role compatibility mode which implements the
214 specification to the tee. Use -compat arg with any of the Auth server
215 directives. This is intended for new and existing FastCGI authorizer
216 applications that require compatibility with other server implementations.
218 *) Fix logging from the process manager. Previously, all calls to the
219 logging routines used NULL for the server_rec. This works fine in a dev
220 environment, but results in most of these messages being tossed by
221 log_error_core() because DEFAULT_LOGLEVEL is too low. Odd logic.
223 *) Always setup fr->header so that in the event the FastCGI server
224 doesn't get a valid FastCGI protocol header over the wire, we
225 can still print our error message to the log from do_work().
227 *) Fix a compile error in open_connection_to_fs() on systems with TCP_NODELAY
228 defined (Don Locrasto [locrasto@iceminer.com]).
230 Changes with mod_fastcgi 2.2.0
232 *) Serious rewrite of mod_fastcgi.html. An example conf will have
233 to wait until another time - I'm burned out on docs updates.
235 *) Add to the mod_fastcgi to the server version string.
237 *) SCO doesn't like the const in the arg to inet_addr() and
240 *) Use Apache's NET_SIZE_T to get the correct arg type for getsockopt().
242 *) Deleted redundant header files from fcgi.h.
244 *) Full path names are no longer required for directives which take
245 file names as arguments. Like other Apache directives you can
246 specify paths from server_root (don't start with a "/").
248 *) The fcgiKillMgr is gone. This intermediate process sat between
249 the Apache parent and the FastCGI Process Manager under Apache
250 1.2. The process manager tries to name itself fcgi_pm (it used
253 *) Authentication, Authorization, and Access phases are now
254 supported. I've bent the FastCgi spec a bit: as many of the standard
255 environment variables (that were easy) are sent (the spec says don't
256 send some by name), all headers (except Status) sent by the auth
257 FastCgi server are passed to subprocesses (CGI/FastCGI invocations)
258 as environment variables rather than just those prefixed by
259 "Variable-". Custom responses for auth failures aren't supported
260 (yet.. we'll see what the demand for this is like). In addition to
261 the FastCGI protocol defined environment variable "FCGI_ROLE" being
262 set to "AUTHORIZER" an environment variable "FCGI_APACHE_ROLE" is
263 set indicating which of the three phases is being processed. See
264 the docs for info on the new per-directory directives:
266 FastCgiAuthenticator, FastCgiAuthenticatorAuthoritative,
267 FastCgiAuthorizer, FastCgiAuthorizerAuthoritative,
268 FastCgiAccessChecker, FastCgiAccessCheckerAuthoritative
270 *) The code has been broken into logical chunks making figuring it
271 out much easier. All of the #defines a user may want to change are
272 now in mod_fastcgi.h.
274 *) All the logging has been converted to the "supported" Apache
275 logging routines, ap_log_error() and ap_log_rerror(). Log entries
276 for request specific errors should now be directed to the correct
277 server errorlog (if your running more than one). Some attempt has
278 been made at setting appropriate log levels (comments of course are
279 welcome) and printing errno info when its of value. All of log
280 messages now have "FastCGI" in them (nice for grep).
282 *) All of the calls to Apache routines have been updated to the ap_
283 convention, eliminating the need for the compat header.
285 *) By default we no longer flush every piece of data we get from the
286 FastCGI server to the client. This allows the FastCGI server to
287 release without having to wait for the client flush to complete.
288 The old behaviour can revived with the -flush argument to AppClass.
290 *) I renamed some of the directives for consistency (the old names
293 AppClass -> FastCgiServer,
294 FCGIConfig -> FastCgiConfig,
295 ExternalAppClass -> FastCgiExternalServer
297 *) Directive arguments are no longer case sensitive.
299 *) The module now uses hard_timeout() rather than soft_timeout. This
300 means that the module will longjump out of the request if the
301 drop-dead timeout expires (set with Apache's Timeout directive, the
302 default is 5min) or if the client closes the connection (SIGPIPE).
303 This is more typical for a Apache modules and I'm not convinced we
304 properly handle all of the error cases well enough to use
305 soft_timeout (I can think of one place we don't anyway). This means
306 your FastCGI application can see SIGPIPE.
308 *) SIGPIPE is now ignored by default in FastCGI servers spawned by
309 Apache. Without this the default behaviour is exit().
311 *) It should (I think) run now under DSO now.
313 *) The bug which prevented sending of binary data in 2.1b1 is fixed.
315 *) The broken -initial-env bug ins 2.1b1 is fixed.
317 *) Maybe some other stuff.
321 *** Well there's a big gap here. Maybe I'll go back and extract the CVS
322 commit notes and stick 'em in here.. when I get some free time. ;)
327 *** Originally from docs/README..
329 Apache[X1.03.01]/mod_fastcgi[02.00.05] 19970909 unsupported
330 From: Stanley Gambarin <stanleyg@cs.bu.edu>
332 *) Yet more changes to the source distribution. Separated out
333 the Tcl dynamic string and buffer libraries into separate files.
334 Did the same for the OS library, however, it is not really an
335 abstraction... more like a bunch of wrappers. Added to DEVNOTES
336 a note about the problem of Apache not allowing including header
339 Apache[X1.03.01]/mod_fastcgi[02.00.04] 19970908 unsupported
340 From: Stanley Gambarin <stanleyg@cs.bu.edu>
342 *) More changes to the installation scripts. Theoretically we
343 should be able to to use the same Makefile/installation script
344 for both Apache 1.2.x and 1.3.x. Need some sort of the abstraction
345 layer to use the same source code for both 1.2.x and 1.3.x sources.
347 Apache[X1.03.01]/mod_fastcgi[02.00.03] 19970905 unsupported
348 From: Stanley Gambarin <stanleyg@cs.bu.edu>
350 *) Created Makefile to compile the module into the archive library,
351 just like the proxy module. Also initial draft of the installation
352 script, which should work for both 1.2 and 1.3 sources of Apache.
354 Apache[01.02.04]/mod_fastcgi[02.00.02] 19970903 unsupported
355 From: Stanley Gambarin <stanleyg@cs.bu.edu>
357 *) More source reorg. Separated out some header files. Need much
358 more work on this. Updated the TODO file. Added fcgivers.h and
359 CHANGES file to track the history.
361 Apache[01.02.04]/mod_fastcgi[02.00.01] 19970902 unsupported
362 From: Stanley Gambarin <stanleyg@cs.bu.edu>
364 *) Source reorganization. This is done to provide a basis for later
365 functionality implementation. See TODO file for more information
366 of what possible future enhancements are possible/desired.
368 Apache[01.02.04]/mod_fastcgi[02.00.00] 19970902 unsupported
369 From: David MacKenzie <djm@va.pubnix.com>
371 *) Create the "dynamic" dir and "mbox" as the user specified in the
372 User and Group directives instead of as root. They are created with
373 restrictive permissions, and then the module checks to see whether the
374 user specified in the User and Group directives has read, write, and
375 execute permissions on them. Those permissions had been explicitly
376 denied by creating them as "root".
378 *) Some documentation was garbled or incomplete.
380 *) When a FastCGI application can't be execl'd, the code used a
381 value of errno that may have been stomped on by intervening system
382 calls. That happened on BSD/OS 2.1, where the error_log was
383 reporting errno=25 (NOTTY) instead of the correct errno=13 (EACCES).
384 An intervening stdio call was setting errno as a side-effect, which
385 it has the right to do.
387 *) Erroneous fprintf arguments, a missing return value, an unused
388 function, missing declarations, and other problems detected by gcc
391 *) Duplicated code to create the lock file name merged into a single
392 function, closing several memory leaks.
394 *) FCGIConfig -minProcesses didn't allow a value of 0, so the last
395 FCGI app in a given dynamic class would live forever, even if it
396 hadn't been requested for weeks.
398 *) The test for whether to keep looking for dynamic app victims to
399 kill was backwards, so no dynamic apps were ever selected as
402 *) The killInterval and updateInterval were being ignored; the
403 sigsuspend() forced recalculations only when a child died,
404 instead of at the intervals specified.
406 *) When a dynamic app couldn't be started, the program SEGV'd when
407 trying to free the ipcAddrPtr twice.
409 *) Remove the dead lock file and socket when cleaning up after a
410 server whose last child has been killed, so the FastCGIHandler
411 isn't fooled into thinking there is still a process serving
414 *) Make file locking robust in the presence of signals.
416 *) Rename some badly named variables.
418 *) Fix typos in many comments.
420 *) Fix some memory and file descriptor leaks.
422 *) Make the blocking kill of a server closer to working.
424 *) More fixes to calculations in dynamic application management.
427 *** Originally from docs/README.OMI..
429 What's New: Version 2.0b1, 16 Apr 1997
431 *) Implemented a mechanism by which FastCGI applications are started by
432 the web server on the first request and continue running. Also, a
433 heuristics have been implemented to allow for dynamic killing of the
434 running FastCGI apps. The configuration options are supplied via
435 the new FCGIConfig directive, that is described in the
438 *) When performing internal redirect, since the original request's body
439 has already been read, do not allow the redirected request to think
440 that is has one [body].
442 *) More conditional compilation for OS/2.
444 *) Fixed occassional "Assertion failed: len > 0, file mod_fastcgi.c"
446 *) Fixed "failed assertion `count >= 0 && count <= bufPtr->length'"
448 *) Added bflush() call after bwrite() in DrainReqOutBuf function to
449 force some output to be written in the period of inactivity. This
450 circumvents the Apache's buffering during the server-push.
452 *) Added a header-parser function placeholder for compatibility with an
455 *) Additional checks have been placed with regard to permissions of the
456 FastCGI processes. These include the existence of the file,
457 ExecCGI and IncludesNOEXEC checks, disallowing of nph- scripts, etc.
459 *) Implemented a restart cleanup, so that no parentlesses FastCGI
460 applications are left after Apache is restarted and/or terminated.
461 This was accomplished via two independent mechanisms, where the
462 first one prevents a start of the process manager on the first
463 reading of the configuration files. The second mechanism deals away
464 from Apache's implementation of fork() (via spawn_child()) and
465 implements its own forking, thus removing any dependencies on the
466 Apache to cleanup processes during termination phase.
468 *) Removed the definition of the Sigfunc, as Apache 2.0b10 defines it
469 itself in the file conf.h
471 What's New: Version 1.4.3, 15 Jan 1997
473 *) Fixed compilation warnings for various platforms, as well as
474 conditional compilation for OS/2.
476 What's New: Version 1.4.2, 12 Dec 1996
478 *) mod_fastcgi.c is ported to Apache 1.2b. Any further development
479 will proceed under this version of Apache web server.
481 *) As the result of porting, the "include virtual" construct of SSI
482 will now work correctly using either <Location> or <Directory>
485 What's New: Version 1.4.1, 4 Dec 1996
487 *) Checks have been removed from the ScanCGIHeaders that provided
488 for the presence of both Status and Location headers as being
489 an error. Contradictory to CGI/1.1 Internet Draft, both of
490 these headers are used by the current CGI applications.
492 What's New: Version 1.4, 22 Nov 1996
494 *) Added the -port option to AppClass, allowing TCP/IP communication.
495 Added the -socket option to AppClass, allowing Unix domain
496 communication via a configurable pathname.
498 *) Added the ExternalAppClass directive, allowing TCP/IP
499 communication with remote FastCGI applications.
501 *) The handler had its own code for generating HTTP response headers;
502 now it uses Apache's. This reduces the size of the module.
503 More importantly, it fixes the bug in which "include virtual"
504 sees the HTTP response headers.
506 *) The response header parser performed very little checking.
507 Now the parser enforces the guidelines in the CGI/1.1
508 Internet-Draft: Status and Location are mutually exclusive,
509 Location can only be a response to GET or HEAD,
510 CGI response headers can't be repeated, etc. (The CGI response
511 headers are the ones the handler interprets: Status, Location,
514 *) The response header parser used to miss CGI headers
515 with no whitespace after the colon, e.g. "Status:200 OK".
517 *) The response header parser sometimes interpreted the first line
518 of content as an RFC822 continuation line.
520 *) The handler implemented a nonstandard version of Location
521 which never used internal redirects. The handler
522 now attempts to implement Location as specified in the
523 CGI/1.1 Internet-Draft. The module documentation explains
526 *) Error log entries from the response header parser were
527 pretty uninformative; they are better now. If a header is
528 malformed, the log entry includes it. If the headers are
529 unterminated rather than malformed, the log entry says that,
530 and says how many bytes were received from the app.
532 *) When the application manager forked a new process, and that
533 process ran into trouble before executing the first instruction
534 of application code, the process used to exit with status =
535 errno. This made certain configuration problems (e.g. incorrect
536 file permissions when server parent is root) quite difficult
537 to pin down. Now the failing child process opens up the error log
538 and writes an informative entry before exiting.
540 *) The module now correctly handles a slash at the end of the
541 DocumentRoot directive. This was a one-line fix.
543 What's New: Version 1.3.3, 17 Oct 1996
545 *) The module now registers its request handler under the name
546 fastcgi-script in addition to the name application/x-httpd-fcgi.
547 This was a one-line addition to the module, but had quite
548 a large impact on the documentation and sample configuration.
550 What's New: Version 1.3.2, 27 Sept 1996
552 *) On some systems (SunOS, Linux?), fopen for append has a bug
553 that strikes when two processes append to the same file.
554 This bug causes the process manager to corrupt the error log.
555 Work around the bug by calling open, then fdopen. A patch
556 to Apache 1.1.1 is also required, as described in mod_fastcgi.html.
557 (Reported by Bob Ramstad.)
559 What's New: Version 1.3.1, 17 Sept 1996
561 *) On Linux and SunOS, the Apache default user_id (-1) is not a
562 legal value of uid_t, so cast it. (Reported by Bob Ramstad,
563 Scott Langley, others.)
565 *) On some systems (Linux, some Solaris?, Irix?), connect requires
566 write access to a Unix Domain socket, so provide it. (Reported
567 by Scott Langley, freeform@wired.com, others.)
569 *) If you hit a .fcg file, but there's no AppClass defined, the
570 error should be NOT_FOUND instead of SERVER_ERROR. (Reported
573 What's New: Version 1.3, 4 Sept 1996
575 *) Module sometimes busy-waited in FastCgiDoWork. Fixed.
577 *) Module violated the Apache buff abstraction.
578 Fixed. Might now work with SSL (not tested).
579 As part of the fix, eliminated support for
580 Apache 1.0x versions.
582 *) Module failed to chmod the Unix domain listening sockets
583 it created, so protections were set according to the current
586 *) Module forked too many process manager processes: One
587 per AppClass. When the Apache parent ran as root, these
588 process manager processes ran as root. New process
589 manager is a single process (only started if AppClass is
590 used) and runs with same privileges as other children.
591 The new process manager doesn't do any polling, so
592 there's less system overhead than before.
594 *) AppClass insisted on getting at least two arguments. Fixed.
596 *) Module used setjmp/longjmp, causing compiler warnings
597 on some platforms (e.g. Linux.) The module no longer
600 *) Module created listening sockets in /tmp, where they were
601 sometimes wiped out by cleanup scripts. Added FastCgiIpcDir
602 directive to give control over the location of listening
605 *) Module wrote error log entries without a timestamp. Fixed.
607 *) AppClass directive wrote error messages to stderr in addition
608 to returning a char * message to the Apache core. Fixed.
610 What's New: Version 1.2, 3 June 1996
612 *) Ported from Apache-1.0-based code to Apache-1.1b2 internals by
615 Add version string: APACHEVERSION macro to mod_fastcgi.c
617 *) chown FastCGI socket to user_id and setuid to user_id for app
620 *) Modify GetFromStream() by having it call an OS dependent
621 function GetStreamSize(FILE *) which uses FILE internal data member.
622 Linux users might need to modify GetStreamSize().
624 What's New: Version 1.1, 10 May 1996
626 *) If you specify a non-existent executable in the AppClass directive,
627 or if the file exists and it does not have execute permission you
628 get a constant stream of error messages telling you that "program
629 terminated due to a signal".
631 *) The mod_fastcgi module should use the standard Apache error logging
632 facility instead of writing to stderr.
634 Version 1.0, 30 April 1996