Jim Jagielski
427c85bd23
Cleanup effort in prep for GA push:
...
Trim trailing whitespace... no func change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Eric Covener
f08932bf97
PR51371: cross-compile issues with cgi and apr_procattr_limit_*.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172019 13f79535-47bb-0310-9956-ffa450edef68
2011-09-17 17:01:15 +00:00
Stefan Fritsch
beb3ea9c11
Add more (trace) logging to the ap_scan_script_header*() functions
...
Add ap_scan_script_header*_ex() functions that take a module index for
logging.
Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the
new functions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 21:53:18 +00:00
Stefan Fritsch
c9fd2623da
Introduce ap_(get|set)_core_module_config() functions/macros and use them
...
everywhere.
We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
Stefan Fritsch
65c04f6b24
Replace some "apr_p[c]alloc / memcpy" constructions into a single apr_pmemdup()s
...
PR: 51214
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125818 13f79535-47bb-0310-9956-ffa450edef68
2011-05-21 21:06:15 +00:00
Jeff Trawick
782c711893
fix some dead assignments found by the clang analyzer
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1098162 13f79535-47bb-0310-9956-ffa450edef68
2011-04-30 21:18:58 +00:00
Stefan Fritsch
bf07c1867c
Add new ap_reserve_module_slots/ap_reserve_module_slots_directive API,
...
necessary if a module (like mod_perl) registers additional modules later than the
EXEC_ON_READ phase.
Tested by: Torsten Foertsch <torsten foertsch gmx net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096569 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 19:22:04 +00:00
Daniel Earl Poirier
eb6ad4da0a
Fix typo in RLIMIT_NPROC
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082237 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 17:58:42 +00:00
Jeff Trawick
46bdc28bf4
fix some logging calls to include the server_rec
...
(and even the conn_rec in a couple of places)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1074871 13f79535-47bb-0310-9956-ffa450edef68
2011-02-26 15:32:01 +00:00
Stefan Fritsch
385da96d50
Use ap_state_query() to fix many modules that were not correctly initializing
...
if they were not active during server startup but got enabled later during a
graceful restart (in which case they need to do all work during a single
config run).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070153 13f79535-47bb-0310-9956-ffa450edef68
2011-02-12 21:23:56 +00:00
Igor Galić
d5024cd27c
In comments: s@ XX @ XXX: @ so they can actually be found seen.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053668 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 16:25:12 +00:00
Eric Covener
8f05af0707
Add support for RLimit* in mod_cgid. PR 42135.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042194 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 14:54:31 +00:00
Graham Leggett
49d8202d76
Avoid unnecessariy initialisation before we test mod_cgid's handler name.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025707 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 20:21:35 +00:00
Stefan Fritsch
7abab7934b
mod_cgid: Log a warning if the ScriptSock path is truncated because
...
it is too long.
PR 49388
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992583 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 11:24:49 +00:00
Jeff Trawick
0ce133f8a8
Intel's compiler warns about assigning the non-enum value 0 to the
...
enumeration apr_finfo_t.filetype, which is done when forgetting
the previously-derived file type
use the appropriate enum value APR_NOFILE instead
Also change comparisons of the field with 0 to use APR_NOFILE instead,
as is the practice of some existing code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:36:52 +00:00
Stefan Fritsch
a527986832
remove more unused variables
...
revove some obsolete comments
netware file is untested
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982050 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 22:12:19 +00:00
Stefan Fritsch
2334a1ea4f
- Add loglevels to request_rec and conn_rec
...
- Introduce per-directory loglevel configuration
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951897 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:04:40 +00:00
Stefan Fritsch
ebb62867fb
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
...
advantage of per-module loglevels
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Takashi Sato
c5e09c5987
Stop unexpected error logs in each requests.
...
sock_write returns not size but status.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@823797 13f79535-47bb-0310-9956-ffa450edef68
2009-10-10 05:52:17 +00:00
Brian Havard
60fbe11de1
Bring back OS/2 support.
...
Reverses r758929 with a little bit of conflict resolution.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
William A. Rowe Jr
0b9ada684a
Use uninterruptable write; noted borrowing this code for lowportd (mod_ftp)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@791604 13f79535-47bb-0310-9956-ffa450edef68
2009-07-06 20:22:49 +00:00
Ruediger Pluem
40c818801c
* Close the accepted fd in the error case to avoid a file descriptor leak.
...
PR: 47335
Submitted by: Kornél Pál <kornelpal gmail.com>
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@783742 13f79535-47bb-0310-9956-ffa450edef68
2009-06-11 12:36:36 +00:00
Ruediger Pluem
c250b42a48
* Close the listening Unix socket of the mod_cgid daemon in the CGI scripts.
...
PR: 47335
Submitted by: Kornél Pál <kornelpal gmail.com>
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@783740 13f79535-47bb-0310-9956-ffa450edef68
2009-06-11 12:32:59 +00:00
Jeff Trawick
c49f671cac
mod_cgid: Improve handling of long AF_UNIX socket names (ScriptSock).
...
Dynamically allocate the AF_UNIX sockaddr based on the required filename size.
For some platforms (e.g., Solaris, OS X, FreeBSD), this allows longer
socket filenames to be used.
When the name is too long, the failure reporting is more consistent and a
socket with truncated pathname is not left stranded. The user still needs
to use ScriptSock to specify a shorter name.
An extra unlink() failure message may be generated when attempting to clean
up the socket after a daemon initialization error; the message is surpressed
for ENOTENT, but not for ENAMETOOLONG.
PR: 47037
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@765725 13f79535-47bb-0310-9956-ffa450edef68
2009-04-16 19:23:45 +00:00
Jeff Trawick
ee32468a33
remove OS/2 platform support
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
Jeff Trawick
40e24b32dd
the length arguments are apr_size_t, not int
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731965 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 15:05:33 +00:00
Jeff Trawick
9560b93d5b
tiny style fix for r729579
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731963 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 14:50:47 +00:00
Nick Kew
b4a75ed08f
PR#39332: fix for segfault problem with mod_cgid on Solaris
...
Patch by Masaoki Kobayashi
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729579 13f79535-47bb-0310-9956-ffa450edef68
2008-12-27 02:13:47 +00:00
Ruediger Pluem
25a74cc4b3
* Do not add an empty argument if we do not have any args for the script.
...
Fixes a regression from r682475.
PR: 46380
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726636 13f79535-47bb-0310-9956-ffa450edef68
2008-12-15 07:47:30 +00:00
Paul Querna
a73acf02f6
API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
Ruediger Pluem
46d3287ea6
* Instead of unixd_setup_child run the drop_privileges hook to switch the
...
userid / groupid.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711234 13f79535-47bb-0310-9956-ffa450edef68
2008-11-04 11:55:25 +00:00
Paul Querna
b1575e4901
* modules/generators/mod_cgid.c
...
(cgid_server): Fix warning: 'env' and 'argv0' may be used uninitialized in
this function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708823 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 08:27:01 +00:00
Jim Jagielski
90ea0dd959
Simplyfy codepath. Don't treat "" as special, just
...
plug along. This matches the codepath in mod_cgi.c
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@682475 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 19:37:31 +00:00
Eric Covener
a3dbf90f4e
*) mod_cgid: Pass along empty command line arguments from an ISINDEX
...
query that has consecutive '+' characters in the QUERY_STRING,
matching the behavior of mod_cgi.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@682389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 13:49:07 +00:00
Eric Covener
5c1dcb86b3
*) mod_cgid: Explicitly set permissions of the socket (ScriptSock) shared by
...
mod_cgid and request processing threads, for OS'es such as HPUX and AIX
that do not use umask for AF_UNIX socket permissions.
[Eric Covener, Jeff Trawick]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654332 13f79535-47bb-0310-9956-ffa450edef68
2008-05-08 00:09:53 +00:00
Jeff Trawick
3da7b6c2c7
mod_cgid: Don't try to restart the daemon if it fails to initialize the socket.
...
It won't get any better without intervention, and it will fork() until some
sort of intervention.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654232 13f79535-47bb-0310-9956-ffa450edef68
2008-05-07 19:38:50 +00:00
Paul Querna
a324a1d72f
Remove all references to CORE_PRIVATE.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Ruediger Pluem
5ebab647ff
* Prevent running through the error stack by returning OK and setting r->status
...
accordingly if ret is HTTP_NOT_MODIFIED as this breaks mod_cache validating a
stale entity.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@541990 13f79535-47bb-0310-9956-ffa450edef68
2007-05-27 13:57:46 +00:00
Jeff Trawick
876e10d0ad
Update the hash table of active script pids even on paths where a
...
script process wasn't created (storing 0 for the pid in that case).
Otherwise, the remembered pid is that of the last successful script
execution for this hash key.
Prior to this patch, the wrong process could be terminated in
rare circumstances:
- A CGI process with pid 10101 is forked for connection 99.
- After the CGI exits and some time elapses, some other process gets
pid 10101. (Connection 99 hasn't handled another CGI request yet.)
- The next time connection 99 has a CGI process, the fork()
or other early setup fails, so no CGI process is created.
- The remembered pid for connection 99 is still 10101. It
gets terminated (subject to permissions).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@503340 13f79535-47bb-0310-9956-ffa450edef68
2007-02-04 00:57:03 +00:00
Garrett Rooney
d20ce0c6a1
Follow up to r451006, use APR_STATUS_IS_TIMEUP instead of comparing against
...
APR_TIMEUP directly.
Reported by: jorton
* modules/generators/mod_cgi.c
(cgi_handler): Use APR_STATUS_IS_TIMEUP.
* modules/generators/mod_cgid.c
(cgid_handler): Ditto.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451289 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 13:48:09 +00:00
Ruediger Pluem
faacd788d1
* Notice that reading of the request entity body failed due to a timeout
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451006 13f79535-47bb-0310-9956-ffa450edef68
2006-09-28 20:15:42 +00:00
Nick Kew
8c2b72b53c
PR 31759 (mutated) - reported by Jo Rhett
...
Don't return apr_status_t error value from input filter chain.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@442758 13f79535-47bb-0310-9956-ffa450edef68
2006-09-12 23:44:12 +00:00
Roy T. Fielding
de659cbed0
update license header text
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c
Update the copyright year in all .c, .h and .xml files
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jim Jagielski
5061d9fa92
No functional Change: Removing trailing whitespace. This also
...
means that "blank" lines consisting of just spaces or
tabs are now really blank lines
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818
No functional change: simple detabbing of indented code.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Roy T. Fielding
16ef40e5ff
Remove CGI block on OPTIONS method so that scripts can
...
respond to OPTIONS directly rather than via server default.
PR: 15242
Reviewed-by: Paul Querna, Andre Malo, William A. Rowe, Jr.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@326255 13f79535-47bb-0310-9956-ffa450edef68
2005-10-18 21:29:43 +00:00
Colm MacCarthaigh
7bd608a78e
Whitespace fixes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293316 13f79535-47bb-0310-9956-ffa450edef68
2005-10-03 11:38:32 +00:00
Jim Jagielski
d81de0d9b3
Add ap_append_pid(); This is performed enough to warrant
...
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:22:08 +00:00
Colm MacCarthaigh
19a0d050b0
If uid_t and gid_t are unsigned on a platform (hurd, for example), using -1
...
may cause a compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264788 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 14:28:48 +00:00