*** empty log message ***
[mod_fastcgi.git] / CHANGES
blobfa223590322b4c418c78968b7e74fae5b84d9337
1 Changes with mod_fastcgi 2.2.3
3  *) Beta WinNT support.  David Allen [djallen@raleigh.ibm.com] and 
4     Rob Saccoccio [robs@chelsea.net]
6  *) Remove request type restriction (GET and POST only) in order to support
7     Web DAV requests.  Scott Robertson [sroberts@codeit.com] 
9  *) Allow requests for URLs such as /server/some/other/qualifier to match a
10     FastCGI server defined as /server.  This was done primarily for Java
11         Servlets, but is generically useful.
13  *) Change the comm between the PM and the request handlers from a regular
14     file to a pipe and an assortment of other dynamic fixes.
16  *) Log dynamic process termination scheduling and the resulting 
17     process exit notification.
19  *) Change the default singleThreshhold from 10 to 0 to prevent the last dynamic
20     application process from being killed off due to low demand.
22  *) Clean up FastCGI application pathnames (e.g. remove duplicate slashes). 
24  *) Fix bugs that prevented dynamic processes from being shutdown when
25     the load subsided.  Lars Heete [heete@do.isst.fhg.de]
27  *) Prevent dynamic processes from being scheduled to be started before
28     the init-start-delay or restart-delay period expires.  This prevents
29         the queuing of process start requests while an application which has
30         a long initialization period starts up.
32  *) When suexec is enabled, allow the process manager to become root again in
33     order to signal applications it spawned.
35  *) Change the "server started" log message level from INFO to WARN.
37  *) Fix dynamic server "Connection Refused" handling.
39  *) Fix demand-based dynamic process spawing (uses a more portable approach).
41  *) Add -idle-timeout arg to FastCgiServer, FastCgiExternalServer, and
42     FastCgiConfig.  mod_fastcgi will now abort a connection if inactive for
43         longer than this period.  It applies to the initiation of connections as
44         well (and thus is similar to appConnTimeout).  Default is 30 seconds.
46  *) appConnTimeout is 0 by default now resulting in blocking connect()s.  This
47     is more platform portable/predicable.
49  *) Leave STDOUT and STDERR open to the main server error_log.  This should
50     eliminate a pile of protocol errors and having to track down 3rd party
51     libs writing to stderr inadvertantly.  This doesn't mean these shouldn't
52     be fixed in the application to use the FastCGI I/O, it just allows these
53     applications to run when previously they'd crash and burn.
55  *) Add the pass-header arg to server directives.
57  *) Allow supplementary groups to be passed to spawned FastCGI applications (as
58     is done for CGI) - at least until PR2580 is resolved.
60  *) Initialize the default (empty) environment in a more socially acceptable
61     way.
63  *) Miscellaneous doc improvements based on notes I've collected up over the
64     last few months.
66  *) Fix a bug in the stderr handling introduced in 2.2.2.  There were conditions
67     that resulted in not or improperly terminated strings.
69  *) Fix the call to setsockopt() to disable Nagle.  [based on a bug report by
70     Johannes Plassmann <johannes.plassmann@pdb.siemens.de>]
72 Changes with mod_fastcgi 2.2.2
74  *) Added support for blocking connect()s by setting appConnTimeout to 0.
75     Non-blocking connect()s (the default) can be troublesome on some platforms.
76     Its expected that blocking connect()s will become the default (and
77     non-blocking connect()s will become optional) in the next release.
79  *) Dump a compile time error if the version of Apache is too old.
81  *) Wrap the SIGPIPE handler manipulation code such that it is only applicable
82     to Apache releases prior to 1.3.6.
84  *) Minor tweaks for RUSSIAN_APACHE.  [Sergey Gershtein <sg@mplik.ru>]
86  *) Dynamic updates:
88     Always restart a failed dynamic application if it is the last instance.
89     This means there once started there will always be at least one process
90     instance of a dynamic application.
92     Send PLEASE_START to the PM when a connect() results in an ECONNREFUSED.
93     ECONNREFUSED means the listen queue is full (or there isn't one).  Asking
94     the PM to start (another) application instance may help empty it faster.
96     Change two sleep() calls to select() based snoozes because alarm() is in
97     effect and sleep() and alarm() don't always play nice together.
99     Fixed a couple of error messages.
101  *) Fix -listen-queue-depth arg on FastCgiConfig (dynamic).  Previously it
102     was ignored and the default was always used.
104  *) Allow the -initial-env argument to be used to pass variables from the
105     Apache process environment to the FastCGI server (by specifying a
106     variable name without the "=" or a value).  [suggested by
107     Martin Lichtin <lichtin@oanda.com>]
109  *) Cleanup some debug macros.
111  *) Improved script stderr handling.  [based on suggestions by
112     David Birnbaum <davidb@chelsea.net>]
114  *) Added IRIX and FreeBSD to the list of supported platforms and other minor
115     updates to the INSTALL doc.
117  *) Changed the default listen-queue-depth (FCGI_DEFAULT_LISTEN_Q) from
118     5 to 100.  Its still configurable with the -listen-queue-depth option.
119     This should help eliminate the FAQ - Why do I see "Connection Refused"
120     messages in the log?
122  *) Fix a bug in FastCgiExternalServer that broke support for external servers
123     on other hosts.  [Dave Neuer <dneuer@futuristics.net>]
125 Changes with mod_fastcgi 2.2.1
127  *) Updates to the INSTALL doc to describe building as a DSO.
129  *) If the FastCgiIpcDir directive was in use and "httpd -t" was issued while
130     Apache was running ("apachectl restart" does this), the contents of the
131     dynamic directory (dynamic sockets and the mbox) would be blown away
132     (a 2.1b1 bug).
134  *) Add an extern declaration for ap_sys_siglist (its exposed but not in any
135     Apache header file) to prevent a compile error on systems without
136     SYS_SIGLIST defined.
138  *) During auth requests, the subprocess_env table was left holding variables
139     sent to the auth FastCGI server (including REMOTE_PASSWD!) which means they
140     were passed to other processing phases (such as CGI/FastCGI).  The
141     subprocess_env is now restored to its pre-auth condition.
143  *) Added a FastCGI Authorizer Role compatibility mode which implements the
144     specification to the tee.  Use -compat arg with any of the Auth server
145     directives.  This is intended for new and existing FastCGI authorizer
146     applications that require compatibility with other server implementations.
148  *) Fix logging from the process manager.  Previously, all calls to the
149     logging routines used NULL for the server_rec.  This works fine in a dev
150     environment, but results in most of these messages being tossed by
151     log_error_core() because DEFAULT_LOGLEVEL is too low.  Odd logic.
153  *) Always setup fr->header so that in the event the FastCGI server
154     doesn't get a valid FastCGI protocol header over the wire, we
155     can still print our error message to the log from do_work().
157  *) Fix a compile error in open_connection_to_fs() on systems with TCP_NODELAY
158     defined (Don Locrasto [locrasto@iceminer.com]).
160 Changes with mod_fastcgi 2.2.0
162  *) Serious rewrite of mod_fastcgi.html.  An example conf will have
163     to wait until another time - I'm burned out on docs updates.
165  *) Add to the mod_fastcgi to the server version string.
167  *) SCO doesn't like the const in the arg to inet_addr() and
168     gethostbyname().
170  *) Use Apache's NET_SIZE_T to get the correct arg type for getsockopt().
172  *) Deleted redundant header files from fcgi.h.
174  *) Full path names are no longer required for directives which take
175     file names as arguments.  Like other Apache directives you can
176     specify paths from server_root (don't start with a "/").
178  *) The fcgiKillMgr is gone.  This intermediate process sat between
179     the Apache parent and the FastCGI Process Manager under Apache
180     1.2.         The process manager tries to name itself fcgi_pm (it used
181     to be fcgiProcMgr).
183  *) Authentication, Authorization, and Access phases are now
184     supported. I've bent the FastCgi spec a bit: as many of the standard
185     environment variables (that were easy) are sent (the spec says don't
186     send some by name), all headers (except Status) sent by the auth
187     FastCgi server are passed to subprocesses (CGI/FastCGI invocations)
188     as environment variables rather than just those prefixed by
189     "Variable-".  Custom responses for auth failures aren't supported
190     (yet.. we'll see what the demand for this is like).  In addition to
191     the FastCGI protocol defined environment variable "FCGI_ROLE" being
192     set to "AUTHORIZER" an environment variable "FCGI_APACHE_ROLE" is
193     set indicating which of the three phases is being processed.  See
194     the docs for info on the new per-directory directives:
196         FastCgiAuthenticator, FastCgiAuthenticatorAuthoritative,
197         FastCgiAuthorizer, FastCgiAuthorizerAuthoritative,
198         FastCgiAccessChecker, FastCgiAccessCheckerAuthoritative
200  *) The code has been broken into logical chunks making figuring it
201     out much easier.  All of the #defines a user may want to change are
202     now in mod_fastcgi.h.
204  *) All the logging has been converted to the "supported" Apache
205     logging routines, ap_log_error() and ap_log_rerror().  Log entries
206     for request specific errors should now be directed to the correct
207     server errorlog (if your running more than one).  Some attempt has
208     been made at setting appropriate log levels (comments of course are
209     welcome) and printing errno info when its of value.  All of log
210     messages now have "FastCGI" in them (nice for grep).
212  *) All of the calls to Apache routines have been updated to the ap_
213     convention, eliminating the need for the compat header.
215  *) By default we no longer flush every piece of data we get from the
216     FastCGI server to the client.  This allows the FastCGI server to
217     release without having to wait for the client flush to complete.
218     The old behaviour can revived with the -flush argument to AppClass.
220  *) I renamed some of the directives for consistency (the old names
221     still work).
223         AppClass -> FastCgiServer,
224         FCGIConfig -> FastCgiConfig,
225         ExternalAppClass -> FastCgiExternalServer
227  *) Directive arguments are no longer case sensitive.
229  *) The module now uses hard_timeout() rather than soft_timeout.  This
230     means that the module will longjump out of the request if the
231     drop-dead timeout expires (set with Apache's Timeout directive, the
232     default is 5min) or if the client closes the connection (SIGPIPE).
233     This is more typical for a Apache modules and I'm not convinced we
234     properly handle all of the error cases well enough to use
235     soft_timeout (I can think of one place we don't anyway). This means
236     your FastCGI application can see SIGPIPE.
238  *) SIGPIPE is now ignored by default in FastCGI servers spawned by
239     Apache.  Without this the default behaviour is exit().
241  *) It should (I think) run now under DSO now.
243  *) The bug which prevented sending of binary data in 2.1b1 is fixed.
245  *) The broken -initial-env bug ins 2.1b1 is fixed.
247  *) Maybe some other stuff.
251 *** Well there's a big gap here.  Maybe I'll go back and extract the CVS
252 commit notes and stick 'em in here.. when I get some free time. ;)
254     --robs  (8 Feb 99)
257 *** Originally from docs/README..
259 Apache[X1.03.01]/mod_fastcgi[02.00.05] 19970909 unsupported
260 From: Stanley Gambarin <stanleyg@cs.bu.edu>
262  *) Yet more changes to the source distribution.  Separated out
263     the Tcl dynamic string and buffer libraries into separate files.
264     Did the same for the OS library, however, it is not really an
265     abstraction... more like a bunch of wrappers.  Added to DEVNOTES
266     a note about the problem of Apache not allowing including header
267     file more than once.
269 Apache[X1.03.01]/mod_fastcgi[02.00.04] 19970908 unsupported
270 From: Stanley Gambarin <stanleyg@cs.bu.edu>
272  *) More changes to the installation scripts.  Theoretically we
273     should be able to to use the same Makefile/installation script
274     for both Apache 1.2.x and 1.3.x.  Need some sort of the abstraction
275     layer to use the same source code for both 1.2.x and 1.3.x sources.
277 Apache[X1.03.01]/mod_fastcgi[02.00.03] 19970905 unsupported
278 From: Stanley Gambarin <stanleyg@cs.bu.edu>
280  *) Created Makefile to compile the module into the archive library,
281     just like the proxy module.  Also initial draft of the installation
282     script, which should work for both 1.2 and 1.3 sources of Apache.
284 Apache[01.02.04]/mod_fastcgi[02.00.02] 19970903 unsupported
285 From: Stanley Gambarin <stanleyg@cs.bu.edu>
287  *) More source reorg.  Separated out some header files.  Need much
288     more work on this.  Updated the TODO file.  Added fcgivers.h and
289     CHANGES     file to track the history.
291 Apache[01.02.04]/mod_fastcgi[02.00.01] 19970902 unsupported
292 From: Stanley Gambarin <stanleyg@cs.bu.edu>
294  *) Source reorganization.  This is done to provide a basis for later
295     functionality implementation.  See TODO file for more information
296     of what possible future enhancements are possible/desired.
298 Apache[01.02.04]/mod_fastcgi[02.00.00] 19970902 unsupported
299 From:  David MacKenzie <djm@va.pubnix.com>
301  *) Create the "dynamic" dir and "mbox" as the user specified in the
302     User and Group directives instead of as root.  They are created with
303     restrictive permissions, and then the module checks to see whether the
304     user specified in the User and Group directives has read, write, and
305     execute permissions on them.  Those permissions had been explicitly
306     denied by creating them as "root".
308  *) Some documentation was garbled or incomplete.
310  *) When a FastCGI application can't be execl'd, the code used a
311     value of errno that may have been stomped on by intervening system
312     calls.  That happened on BSD/OS 2.1, where the error_log was
313     reporting errno=25 (NOTTY) instead of the correct errno=13 (EACCES).
314     An intervening stdio call was setting errno as a side-effect, which
315     it has the right to do.
317  *) Erroneous fprintf arguments, a missing return value, an unused
318     function, missing declarations, and other problems detected by gcc
319     -Wall.
321  *) Duplicated code to create the lock file name merged into a single
322     function, closing several memory leaks.
324  *) FCGIConfig -minProcesses didn't allow a value of 0, so the last
325     FCGI app in a given dynamic class would live forever, even if it
326     hadn't been requested for weeks.
328  *) The test for whether to keep looking for dynamic app victims to
329     kill was backwards, so no dynamic apps were ever selected as
330     victims.
332  *) The killInterval and updateInterval were being ignored; the
333     sigsuspend() forced recalculations only when a child died,
334     instead of at the intervals specified.
336  *) When a dynamic app couldn't be started, the program SEGV'd when
337     trying to free the ipcAddrPtr twice.
339  *) Remove the dead lock file and socket when cleaning up after a
340         server whose last child has been killed, so the FastCGIHandler
341     isn't fooled into thinking there is still a process serving
342     that app.
344  *) Make file locking robust in the presence of signals.
346  *) Rename some badly named variables.
348  *) Fix typos in many comments.
350  *) Fix some memory and file descriptor leaks.
352  *) Make the blocking kill of a server closer to working.
354  *) More fixes to calculations in dynamic application management.
357 *** Originally from docs/README.OMI..
359 What's New: Version 2.0b1, 16 Apr 1997
361  *) Implemented a mechanism by which FastCGI applications are started by
362     the web server on the first request and continue running.  Also,  a
363     heuristics have been implemented to allow for dynamic killing of the
364     running FastCGI apps.  The configuration options are supplied via
365         the new FCGIConfig directive, that is described in the
366         mod_fastcgi.html
368  *) When performing internal redirect, since the original request's body
369     has already been read, do not allow the redirected request to think
370     that is has one [body].
372  *) More conditional compilation for OS/2.
374  *) Fixed occassional  "Assertion failed: len > 0, file mod_fastcgi.c"
376  *) Fixed "failed assertion `count >= 0 && count <= bufPtr->length'"
378  *) Added bflush() call after bwrite() in DrainReqOutBuf function to
379     force some output to be written in the period of inactivity. This
380     circumvents the Apache's buffering during the server-push.
382  *) Added a header-parser function placeholder for compatibility with an
383     Apache source code.
385  *) Additional checks have been placed with regard to permissions of the
386     FastCGI processes.  These include the existence of the  file,
387     ExecCGI and IncludesNOEXEC checks, disallowing of nph- scripts, etc.
389  *) Implemented a restart cleanup, so that no parentlesses FastCGI
390         applications are left after Apache is restarted and/or terminated.
391         This was accomplished via two independent mechanisms, where the
392         first one prevents a start of the process manager on the first
393         reading of the configuration files.  The second mechanism deals away
394         from Apache's  implementation of fork() (via spawn_child()) and
395         implements its own forking, thus removing any dependencies on the
396         Apache to cleanup  processes during termination phase.
398  *) Removed the definition of the Sigfunc, as Apache 2.0b10 defines it
399     itself in the file conf.h
401 What's New: Version 1.4.3, 15 Jan 1997
403  *) Fixed compilation warnings for various platforms, as well as
404         conditional compilation for OS/2.
406 What's New: Version 1.4.2, 12 Dec 1996
408  *) mod_fastcgi.c is ported to Apache 1.2b.  Any further development
409         will proceed under this version of Apache web server.
411  *) As the result of porting, the "include virtual" construct of SSI
412         will now work correctly using either <Location> or <Directory>
413         directive.
415 What's New: Version 1.4.1, 4 Dec 1996
417  *) Checks have been removed from the ScanCGIHeaders that provided
418     for the presence of both Status and Location headers as being
419     an error.  Contradictory to CGI/1.1 Internet Draft, both of
420     these headers are used by the current CGI applications.
422 What's New: Version 1.4, 22 Nov 1996
424  *) Added the -port option to AppClass, allowing TCP/IP communication.
425     Added the -socket option to AppClass, allowing Unix domain
426     communication via a configurable pathname.
428  *) Added the ExternalAppClass directive, allowing TCP/IP
429     communication with remote FastCGI applications.
431  *) The handler had its own code for generating HTTP response headers;
432     now it uses Apache's.  This reduces the size of the module.
433     More importantly, it fixes the bug in which "include virtual"
434     sees the HTTP response headers.
436  *) The response header parser performed very little checking.
437     Now the parser enforces the guidelines in the CGI/1.1
438     Internet-Draft: Status and Location are mutually exclusive,
439     Location can only be a response to GET or HEAD,
440     CGI response headers can't be repeated, etc.  (The CGI response
441     headers are the ones the handler interprets: Status, Location,
442     and Content-type.)
444  *) The response header parser used to miss CGI headers
445     with no whitespace after the colon, e.g. "Status:200 OK".
447  *) The response header parser sometimes interpreted the first line
448     of content as an RFC822 continuation line.
450  *) The handler implemented a nonstandard version of Location
451     which never used internal redirects.  The handler
452     now attempts to implement Location as specified in the
453     CGI/1.1 Internet-Draft.  The module documentation explains
454     the new behavior.
456  *) Error log entries from the response header parser were
457     pretty uninformative; they are better now.  If a header is
458     malformed, the log entry includes it.  If the headers are
459     unterminated rather than malformed, the log entry says that,
460     and says how many bytes were received from the app.
462  *) When the application manager forked a new process, and that
463     process ran into trouble before executing the first instruction
464     of application code, the process used to exit with status =
465     errno.  This made certain configuration problems (e.g. incorrect
466     file permissions when server parent is root) quite difficult
467     to pin down.  Now the failing child process opens up the error log
468     and writes an informative entry before exiting.
470  *) The module now correctly handles a slash at the end of the
471     DocumentRoot directive.  This was a one-line fix.
473 What's New: Version 1.3.3, 17 Oct 1996
475  *) The module now registers its request handler under the name
476     fastcgi-script in addition to the name application/x-httpd-fcgi.
477     This was a one-line addition to the module, but had quite
478     a large impact on the documentation and sample configuration.
480 What's New: Version 1.3.2, 27 Sept 1996
482  *) On some systems (SunOS, Linux?), fopen for append has a bug
483     that strikes when two processes append to the same file.
484     This bug causes the process manager to corrupt the error log.
485     Work around the bug by calling open, then fdopen.  A patch
486     to Apache 1.1.1 is also required, as described in mod_fastcgi.html.
487     (Reported by Bob Ramstad.)
489 What's New: Version 1.3.1, 17 Sept 1996
491  *) On Linux and SunOS, the Apache default user_id (-1) is not a
492     legal value of uid_t, so cast it.  (Reported by Bob Ramstad,
493     Scott Langley, others.)
495  *) On some systems (Linux, some Solaris?, Irix?), connect requires
496     write access to a Unix Domain socket, so provide it.  (Reported
497     by Scott Langley, freeform@wired.com, others.)
499  *) If you hit a .fcg file, but there's no AppClass defined, the
500     error should be NOT_FOUND instead of SERVER_ERROR.  (Reported
501     by Michael Smith.)
503 What's New: Version 1.3, 4 Sept 1996
505  *) Module sometimes busy-waited in FastCgiDoWork.  Fixed.
507  *) Module violated the Apache buff abstraction.
508     Fixed.  Might now work with SSL (not tested).
509     As part of the fix, eliminated support for
510     Apache 1.0x versions.
512  *) Module failed to chmod the Unix domain listening sockets
513     it created, so protections were set according to the current
514     umask.  Fixed.
516  *) Module forked too many process manager processes: One
517     per AppClass.  When the Apache parent ran as root, these
518     process manager processes ran as root.  New process
519     manager is a single process (only started if AppClass is
520     used) and runs with same privileges as other children.
521     The new process manager doesn't do any polling, so
522     there's less system overhead than before.
524  *) AppClass insisted on getting at least two arguments.  Fixed.
526  *) Module used setjmp/longjmp, causing compiler warnings
527     on some platforms (e.g. Linux.)  The module no longer
528     uses setjmp/longjmp.
530  *) Module created listening sockets in /tmp, where they were
531     sometimes wiped out by cleanup scripts.  Added FastCgiIpcDir
532     directive to give control over the location of listening
533     sockets.
535  *) Module wrote error log entries without a timestamp.  Fixed.
537  *) AppClass directive wrote error messages to stderr in addition
538     to returning a char * message to the Apache core.  Fixed.
540 What's New: Version 1.2, 3 June 1996
542  *) Ported from Apache-1.0-based code to Apache-1.1b2 internals by
543     Ralf S. Engelschall
544     <rse@en.muc.de>
545     Add version string: APACHEVERSION macro to mod_fastcgi.c
547  *) chown FastCGI socket to user_id and setuid to user_id for app
548     class processes
550  *) Modify GetFromStream() by having it call an OS dependent
551     function GetStreamSize(FILE *) which uses FILE internal data member.
552     Linux users might need to modify GetStreamSize().
554 What's New: Version 1.1, 10 May 1996
556  *) If you specify a non-existent executable in the AppClass directive,
557         or if the file exists and it does not have execute permission you
558         get a constant stream of error messages telling you that "program
559         terminated due to a signal".
561  *) The mod_fastcgi module should use the standard Apache error logging
562         facility instead of writing to stderr.
564 Version 1.0, 30 April 1996