Peter Zijlstra [Wed, 8 Feb 2006 13:10:53 +0000 (8 14:10 +0100)]
Suport Non Parsed Headers (nph)
This patch adds support for Non Parsed Headers (nph) to
mod_fastcgi. Borrowed the code from apache2's mod_cgi.
Peter Zijlstra [Wed, 8 Feb 2006 13:10:53 +0000 (8 14:10 +0100)]
write_to_client: error out on disconnect
In order to hande the disconnect of web-clients mod_fastcgi needs
not only check the return status of ap_pass_brigade() but also
the connection state.
Otherwise the process manager will glady keep the connection to the
FastCGI process open until it is done generating data.
Daniel Smertnig [Wed, 7 Dec 2005 21:19:34 +0000 (7 22:19 +0100)]
Fastcgi module for Apache 2.2
OK, after some investigation I found out that the "new" (apr_*) symbols
were introduced beginning with 2.0 and that the older symbols were
defines were dropped.
Therefore I believe the simplest/shortest way to make mod_fastcgi work
with 1.3, 2.0 and 2.2 is to reintroduce these defines ourselves when
necessary. The attached patch does this and additionaly fixes a problem
in Makefile.AP2 under 2.2 (still works under 2.0 though).
It was tested on 1.3.33, 2.0.55 and 2.2 and compiles and loads on all
three versions. I believe it is suitable for inclusion in the official
code base.
robs [Thu, 15 Apr 2004 02:01:26 +0000 (15 02:01 +0000)]
move/fix the 'no suexec' path/code just committed
robs [Thu, 15 Apr 2004 01:23:05 +0000 (15 01:23 +0000)]
Don't count an application exit towards the number of
failures when doing restart backoff handling if the exit
status is 0. ["Rob Saccoccio" <robs fastcgi.com>]
Modified Files: fcgi_pm.c CHANGES
robs [Thu, 15 Apr 2004 00:49:57 +0000 (15 00:49 +0000)]
email address cleanup and obscuring
robs [Thu, 15 Apr 2004 00:32:56 +0000 (15 00:32 +0000)]
[*nix] Don't use suexec when there is no user/group in effect.
This change is consistent with Apache2 handling. Identified
by ["Florian Effenberger" <floeff arcor.de>].
Modified Files: CHANGES fcgi_pm.c
robs [Wed, 7 Jan 2004 02:03:28 +0000 (7 02:03 +0000)]
set version to 2.4.3
robs [Wed, 7 Jan 2004 02:02:31 +0000 (7 02:02 +0000)]
add -min-server-life docs
robs [Wed, 7 Jan 2004 01:56:00 +0000 (7 01:56 +0000)]
Add a -min-server-life option to the FastCgiConfig and
FastCgiServer directives to provide better control of the
restart backoff feature. Benjamin Osheroff [ben@gimbo.net]
Modified Files: fcgi_config.c fcgi_pm.c fcgi_util.c mod_fastcgi.c fcgi.h
mod_fastcgi.h CHANGES docs/mod_fastcgi.html
robs [Wed, 7 Jan 2004 01:16:24 +0000 (7 01:16 +0000)]
add .deps, .project, .cdtproject, Debug, Release
robs [Tue, 25 Nov 2003 00:02:19 +0000 (25 00:02 +0000)]
remove carriage returns
robs [Mon, 24 Nov 2003 02:38:39 +0000 (24 02:38 +0000)]
set version - 2.4.2
robs-test [Tue, 18 Nov 2003 01:58:52 +0000 (18 01:58 +0000)]
commit mail test
robs [Tue, 18 Nov 2003 01:53:04 +0000 (18 01:53 +0000)]
remove CRs
sv [Thu, 13 Nov 2003 02:15:18 +0000 (13 02:15 +0000)]
Added Debian build files, based on 2.4.0-2 mod_fastcgi package from Debian unstable
sv [Wed, 12 Nov 2003 11:54:41 +0000 (12 11:54 +0000)]
Gotta have it! :-)
robs [Tue, 4 Nov 2003 00:42:01 +0000 (4 00:42 +0000)]
add a note to see INSTALL.AP2
robs [Sun, 2 Nov 2003 22:59:41 +0000 (2 22:59 +0000)]
fix the Project lines
robs [Sun, 2 Nov 2003 22:58:21 +0000 (2 22:58 +0000)]
add to usage info
robs [Thu, 30 Oct 2003 01:08:34 +0000 (30 01:08 +0000)]
Remove all C++ style comments (even in the WIN code)
robs [Thu, 30 Oct 2003 00:59:21 +0000 (30 00:59 +0000)]
Remove a superfluous "break" that caused a compile warning on IRIX
robs [Tue, 28 Oct 2003 02:26:12 +0000 (28 02:26 +0000)]
[WIN32] Fix handle leaks in the process manager
robs [Tue, 24 Jun 2003 01:31:24 +0000 (24 01:31 +0000)]
[WIN] Use a permanent pool for allocating the SystemRoot
environment variable. Sakamoto [ringring@zb4.so-net.ne.jp]
Modified Files: CHANGES fcgi_config.c
robs [Thu, 19 Jun 2003 02:19:40 +0000 (19 02:19 +0000)]
bump version to 2.4.1
robs [Thu, 19 Jun 2003 02:18:00 +0000 (19 02:18 +0000)]
[WIN] Fix starting of scripts under AP2.
Modified Files: CHANGES fcgi_pm.c mod_fastcgi.c
robs [Wed, 18 Jun 2003 00:25:17 +0000 (18 00:25 +0000)]
Do the connect() to the application *after* collecting a
chunk of client data. This reinstates the pre-2.4.0
behaviour. James Jurach [muaddib@erf.net].
Modified Files: mod_fastcgi.c CHANGES
robs [Tue, 17 Jun 2003 01:24:48 +0000 (17 01:24 +0000)]
Remove an assert that was triggering on WIN when spawn() failed
robs [Tue, 4 Feb 2003 01:14:10 +0000 (4 01:14 +0000)]
Provide a NO_SUEXEC_FOR_AP_USER_N_GROUP macro for building
mod_fastcgi with the AP13 suexec behaviour (don't use suexec
if httpd's user and group match that needed for the application).
robs [Tue, 4 Feb 2003 00:54:11 +0000 (4 00:54 +0000)]
Prevent the use of all but the "auth" directives from being used
anywhere but in global scope. Prevent more than one instance
of the FastCgiWrapper directive.
robs [Tue, 4 Feb 2003 00:29:40 +0000 (4 00:29 +0000)]
Return NOT_FOUND (404) or FORBIDDEN (403) instead of
INTERNAL_SERVER_ERROR (500) when there are configuration issues
or the script does't exist. Suggested by Jeff Lawson [bovine@ud.com].
robs [Mon, 3 Feb 2003 23:07:37 +0000 (3 23:07 +0000)]
cleanup some warnings in the release build as a result of the last commit regarding asserts
robs [Mon, 3 Feb 2003 22:59:01 +0000 (3 22:59 +0000)]
remove an uneeded assert() from fcgi_pm.c
define ASSERT only in debug builds
replace all occurances of ap_assert() with ASSERT
robs [Sun, 19 Jan 2003 16:36:49 +0000 (19 16:36 +0000)]
bump version to 2.4.0
robs [Sun, 19 Jan 2003 16:33:51 +0000 (19 16:33 +0000)]
[*nix Security] - When FastCgiWrapper (FastCgiSuexec) was in use
and a vhost configured to use the same uid/gid as the main
server, mod_fastcgi would not bother using the wrapper (suexec)
because its effective uid/gid was already appropriate. This is
consistent with Apache's v1.3 mod_cgi behaviour. There are two
problems with this approach: 1) when FastCgWrapper is in use
mod_fastcgi's process manager keeps its root privileges (as its
real uid/gid) so it can terminate the applications its starts -
this privilege was being passed to applications when the use of
the wrapper was bypassed 2) wrappers are often employed to
perform functionality beyond setting the uid/gid - by not calling
the wrapper under certain circumstances, application invocation
environments were inconsistent. With this change, the wrapper is
always used (when enabled) under both Apache 1.3 and 2.
Reported by Michael Richards [michael@fastmail.ca].
Modified Files: CHANGES fcgi_pm.c
robs [Mon, 23 Dec 2002 03:19:14 +0000 (23 03:19 +0000)]
[*nix/AP2] Use the vhost uid/gid instead of the server uid/gid
for dynamic application invocation when the FastCgiWrapper is in use.
Reported by Michael Richards [michael@fastmail.ca]
Modified Files: CHANGES mod_fastcgi.c
robs [Mon, 23 Dec 2002 03:13:15 +0000 (23 03:13 +0000)]
[*nix] Fix handling of FastCgiWrapper when passed a real path,
i.e. other than "on" or "off". Michael Richards [michael@fastmail.ca]
Modified Files: CHANGES fcgi_config.c
robs [Thu, 5 Dec 2002 03:02:17 +0000 (5 03:02 +0000)]
Eliminate the logging of "incomplete headers (0 bytes) received from
server" when a client aborts.
robs [Thu, 5 Dec 2002 03:02:05 +0000 (5 03:02 +0000)]
Eliminate the logging of "incomplete headers (0 bytes) received from
server" when a client aborts.
Remove STATE_CLIENT_ERROR from npipe_io() - it didn't do anything
useful (now use STATE_ERROR instead).
robs [Thu, 5 Dec 2002 02:41:26 +0000 (5 02:41 +0000)]
[WIN32] Fix a delay in handling large POSTs to named pipe based
servers. Philip Gladstone [philip@okena.com]
robs [Thu, 24 Oct 2002 00:58:57 +0000 (24 00:58 +0000)]
eliminate a gcc -Wall warning under AP1.3
robs [Tue, 22 Oct 2002 02:44:15 +0000 (22 02:44 +0000)]
fix to last commit for WIN - get_server_xid fns should return 0 under WIN
robs [Tue, 22 Oct 2002 02:37:32 +0000 (22 02:37 +0000)]
use the real uid to do the setuid_root (this
is root in a normal run mode)
robs [Tue, 22 Oct 2002 02:36:13 +0000 (22 02:36 +0000)]
fix a typo in -user arg processing
robs [Tue, 22 Oct 2002 01:02:18 +0000 (22 01:02 +0000)]
clear up some gcc -Wall warnings
robs [Mon, 21 Oct 2002 23:55:46 +0000 (21 23:55 +0000)]
check for the presence of the wrapper when 'On' is used, default the user/group for a server to that
associated with the vhost (AP) or main server (AP2)
robs [Mon, 21 Oct 2002 23:54:24 +0000 (21 23:54 +0000)]
have the get_server_xid fns return the main server's id under AP2
robs [Sat, 19 Oct 2002 02:09:29 +0000 (19 02:09 +0000)]
prevent module init from running twice under AP2/*nix
robs [Sat, 19 Oct 2002 00:07:54 +0000 (19 00:07 +0000)]
make the default socket dir relative on *nix
robs [Fri, 18 Oct 2002 02:20:09 +0000 (18 02:20 +0000)]
fixes to initialize the socket dir when FastCgiIpcDir isn't in use (changes
needed as result of the default socket dir move)
robs [Sat, 12 Oct 2002 01:52:22 +0000 (12 01:52 +0000)]
Eliminate the need for SetHandler or AddHandler with static or
external applications.
robs [Sat, 12 Oct 2002 00:23:27 +0000 (12 00:23 +0000)]
Limit PM requests to start a dynamic application
to 5sec to prevent endless spinning (this is a drop-dead
limit that should only occur if the socket/named_pipe directory
is removed out from under a running server).
robs [Fri, 11 Oct 2002 00:07:03 +0000 (11 00:07 +0000)]
fix the closesocket call that I just committed
robs [Sun, 6 Oct 2002 00:41:41 +0000 (6 00:41 +0000)]
change a close() call to closesocket() for win - submitted by Shane Caraveo
robs [Fri, 4 Oct 2002 04:37:48 +0000 (4 04:37 +0000)]
change to the default socket directory
robs [Fri, 4 Oct 2002 04:33:20 +0000 (4 04:33 +0000)]
[*nix] Change the default socket directory from /tmp/fcgi to:
Apache - logs/fastcgi
Apache2 - RUNTIMEDIR/fastcgi
Modified Files: CHANGES fcgi_config.c mod_fastcgi.c mod_fastcgi.h
robs [Sun, 22 Sep 2002 23:41:20 +0000 (22 23:41 +0000)]
*nix tweaks
robs [Sun, 22 Sep 2002 19:01:59 +0000 (22 19:01 +0000)]
1st cut at wrapper support under Apache2.
Support for -user and -group options
robs [Sun, 22 Sep 2002 19:00:51 +0000 (22 19:00 +0000)]
tweak FastCgiWrapper discussion
robs [Sun, 22 Sep 2002 18:44:07 +0000 (22 18:44 +0000)]
Add -user and -group options to FastCgiServer and FastCgiExternalServer.
robs [Sun, 22 Sep 2002 16:53:13 +0000 (22 16:53 +0000)]
fcgi_util_fs_set_uid_n_gid(): return an error if the uid or gid is 0 (prep for
wrapper support under AP2)
robs [Sun, 22 Sep 2002 16:49:34 +0000 (22 16:49 +0000)]
[WIN32] Under Apache2, require v2.0.41 or later in order to pickup my
apr_proc_create() changes.
Add ap_suexec_enabled macro
robs [Sat, 21 Sep 2002 14:22:46 +0000 (21 14:22 +0000)]
Log when invoking and restoring the restart backoff policy.
robs [Sat, 21 Sep 2002 13:55:35 +0000 (21 13:55 +0000)]
*) [WIN32] Prevent intermittent ReadFile() failures (properly initialize the
OVERLAPPED structure).
robs [Sat, 21 Sep 2002 03:25:56 +0000 (21 03:25 +0000)]
*) Eliminate need for dummy files for external servers under Apache2
*) Fix auth compatibility mode handling for access checker and authorizer
robs [Wed, 4 Sep 2002 03:23:33 +0000 (4 03:23 +0000)]
Fix HEAD request handling. Based on a patch by
Chris Lightfoot [chris@ex-parrot.com]
robs [Tue, 20 Aug 2002 03:01:43 +0000 (20 03:01 +0000)]
add unixd.h include and remove some warnings
robs [Tue, 20 Aug 2002 03:01:15 +0000 (20 03:01 +0000)]
add unixd.h include
robs [Tue, 20 Aug 2002 03:00:46 +0000 (20 03:00 +0000)]
fix top_dir instructions
robs [Tue, 20 Aug 2002 02:36:15 +0000 (20 02:36 +0000)]
Put back support for uid/gid changing under Apache2.
Based on a patch by Sydney Weinstein [syd@verne.myxa.com]
robs [Mon, 29 Jul 2002 02:18:12 +0000 (29 02:18 +0000)]
*** empty log message ***
robs [Mon, 29 Jul 2002 02:16:52 +0000 (29 02:16 +0000)]
apache2 build systems wants this
robs [Mon, 29 Jul 2002 02:03:09 +0000 (29 02:03 +0000)]
*** empty log message ***
robs [Mon, 29 Jul 2002 01:38:40 +0000 (29 01:38 +0000)]
*** empty log message ***
robs [Mon, 29 Jul 2002 01:36:34 +0000 (29 01:36 +0000)]
Apache2 build files
robs [Mon, 29 Jul 2002 00:07:28 +0000 (29 00:07 +0000)]
fix forking and call to close a socket
robs [Mon, 29 Jul 2002 00:06:39 +0000 (29 00:06 +0000)]
define get_signal_text macro to account for differences in the way AP2 provides access to the signal def strings
robs [Mon, 29 Jul 2002 00:05:06 +0000 (29 00:05 +0000)]
allow AP2 to setup fcgi_user/group_id
robs [Fri, 26 Jul 2002 03:14:08 +0000 (26 03:14 +0000)]
tweak to last commit for win
robs [Fri, 26 Jul 2002 03:10:53 +0000 (26 03:10 +0000)]
*nix AP2 changes (untested)
robs [Wed, 24 Jul 2002 02:30:58 +0000 (24 02:30 +0000)]
elminate a static stat buffer
robs [Tue, 23 Jul 2002 02:39:18 +0000 (23 02:39 +0000)]
[*nix] When autoupdate is enabled touch the socket when restarting
the processes to prevent further requests.
Eckebrecht von Pappenheim [evp@heise.de]
robs [Tue, 23 Jul 2002 00:56:09 +0000 (23 00:56 +0000)]
AP2 support
robs [Tue, 23 Jul 2002 00:54:18 +0000 (23 00:54 +0000)]
initial AP2 support (win)
robs [Fri, 7 Jun 2002 00:54:13 +0000 (7 00:54 +0000)]
[WIN32] Don't read from a potentially closed named pipe.
Philip Gladstone [philip@okena.com]
robs [Fri, 7 Jun 2002 00:41:32 +0000 (7 00:41 +0000)]
remove unused macro BufferSize
robs [Thu, 30 May 2002 00:41:09 +0000 (30 00:41 +0000)]
add MacOSX to the platform list
robs [Wed, 13 Mar 2002 23:32:19 +0000 (13 23:32 +0000)]
#ifdef WIN's npipe_io routine & add a debug log entry
robs [Wed, 13 Mar 2002 23:31:08 +0000 (13 23:31 +0000)]
add a debug log entry
robs [Wed, 13 Mar 2002 18:32:34 +0000 (13 18:32 +0000)]
set dynamic's request complete time just once (from close_connection())
[WIN32] add queueing to named pipe connects
robs [Wed, 13 Mar 2002 18:25:20 +0000 (13 18:25 +0000)]
[WIN32] fix a usec bug in the ticks() routine
robs [Tue, 12 Mar 2002 23:25:59 +0000 (12 23:25 +0000)]
don't bother checking the fcgi_util_ticks() return code for an error - if it
breaks some serious is wrong.
robs [Tue, 12 Mar 2002 13:06:29 +0000 (12 13:06 +0000)]
* remove wrapped buffer read/write support on platforms without
readv/writev (buf.c)
* add buf_removed() and buf_added() (buf.c)
* rewrite do_work(): breaking the npipe and socket handling into their own
routines (mod_fastcgi.c and buf.c)
* use async/overlapped io instead of non-blocking npipes - this eliminates
the use of (broken) polling (mod_fastcgi.c)
* require Apache version >= 1.3.6 to elminate the need for the funky
signal handling (mod_fastcgi.c)
* properly dispose of stdin received in redirects (protocol.c)
robs [Tue, 5 Mar 2002 18:18:47 +0000 (5 18:18 +0000)]
don't linger when closing the connection to the server - force a TCP RST
robs [Mon, 4 Mar 2002 22:31:01 +0000 (4 22:31 +0000)]
Handle another case where an error occurs but the application has sent a complete response.
robs [Mon, 4 Mar 2002 22:20:57 +0000 (4 22:20 +0000)]
Call WSASetLastError() instead of SetLastError()
robs [Mon, 4 Mar 2002 02:29:33 +0000 (4 02:29 +0000)]
Handle an application returning a complete and valid response without
having consumed all of the data sent to it.
Consume remaining client data (RESPONDERs only) if any.
robs [Fri, 1 Mar 2002 13:44:14 +0000 (1 13:44 +0000)]
note the use of escaped backslashes when using FastCgiIpcDir on WIN and typical use
robs [Thu, 28 Feb 2002 22:52:50 +0000 (28 22:52 +0000)]
Add support for backing off attempts to start applications that continuously
fail to start. Three new macros defined in mod_fastcgi.h control this
behaviour: MAX_FAILED_STARTS, RUNTIME_SUCCESS_INTERVAL,
FAILED_STARTS_DELAY
robs [Thu, 28 Feb 2002 21:38:51 +0000 (28 21:38 +0000)]
remove a couple of debug lines