1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

231 Commits

Author SHA1 Message Date
Jeff Trawick
8fe24d1f1b Fix a storage leak in mod_cgid... the temporary pool created for
each request was not cleaned up.

This removes the nastiest symptom of some excess pipes being created
(i.e., we don't run out of file descriptors), though something
additional is needed to keep from creating the pipes to begin with.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88611 13f79535-47bb-0310-9956-ffa450edef68
2001-03-29 00:17:50 +00:00
Jeff Trawick
26d5f3b1c8 get rid of unused parameter filename to function get_req()
PR:		6980


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88432 13f79535-47bb-0310-9956-ffa450edef68
2001-03-02 22:00:30 +00:00
William A. Rowe Jr
16231360f1 Goodbye ap_send_http_header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 15:24:09 +00:00
Ryan Bloom
4296146043 Begin to move functions from the http module to the core. The goal is to
have only functions that are HTTP specific in the http directory.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88341 13f79535-47bb-0310-9956-ffa450edef68
2001-02-26 04:38:22 +00:00
Ryan Bloom
f740468deb Close the accepted socket before creating the CGI process in mod_cgid.
This is safe, because we have already dup'ed the socket for the CGI
process itself.  This change allows CGI processes to fork long-lived
child processes without affecting how quickly the response gets back
to the broswer.

PR:	7273
Submitted by:	Taketo Kabe <kabe@sra-tohoku.co.jp>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88264 13f79535-47bb-0310-9956-ffa450edef68
2001-02-21 19:07:21 +00:00
Jeff Trawick
ad4230b947 get rid of a type mismatch warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88246 13f79535-47bb-0310-9956-ffa450edef68
2001-02-20 09:27:45 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Doug MacEachern
d42ea0426e s/apr_bucket_pipe_creat/apr_bucket_pipe_create/ typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88141 13f79535-47bb-0310-9956-ffa450edef68
2001-02-13 20:16:15 +00:00
Greg Stein
dc44adee51 include "apr_signal.h" when needed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88082 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 01:09:02 +00:00
Greg Stein
5dc34feb12 *) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88061 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 14:04:21 +00:00
Greg Stein
23714288fe *) remove obsolete http_conf_globals.h
*) simplify all this #ifdef'ing: just nuke the unixd.h header. it isn't
   actually needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88045 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 03:03:18 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
Ryan Bloom
0d10444e86 Make sure that mod_include's post_config hook always runs before
mod_cgi(d)'s post_config hook.  Mod_include creates a hash table in the
post_config stage that mod_cgi(d) uses during it's post_config stage, so
it must be done in this order.
Submitted by:	 Brian Havard <brianh@kheldar.apana.org.au>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87992 13f79535-47bb-0310-9956-ffa450edef68
2001-02-06 16:21:14 +00:00
Ryan Bloom
fbfcde1463 Move the logic for creating CGI processes from mod_include to mod_cgi(d).
This removes a good deal of duplicate logic for creating CGI scripts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87984 13f79535-47bb-0310-9956-ffa450edef68
2001-02-05 22:57:21 +00:00
Jeff Trawick
553cdad802 keep mod_cgid from segfaulting on SIGHUP; it assumed
access to a pid, but that wasn't passed to apr_register_other_child


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87950 13f79535-47bb-0310-9956-ffa450edef68
2001-02-01 22:09:08 +00:00
William A. Rowe Jr
6282d6e364 Eliminate all assumptions that finfo.protection reflects the existance
or absense of a file.  finfo.filetype is defined as 0 if APR_NOFILE,
  or a non-zero value if the file could be apr_stat()'ed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87933 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 22:45:35 +00:00
Ryan Bloom
47b513e45d Clean up the cgid module now that it supports suexec.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87910 13f79535-47bb-0310-9956-ffa450edef68
2001-01-29 19:42:16 +00:00
Ryan Bloom
82ee747e96 Make mod_cgid work with SuExec. This has been tested and works reliably
on my machine, but since this is security related, this should be tested
and scrutinized by as many people as possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87905 13f79535-47bb-0310-9956-ffa450edef68
2001-01-29 05:41:04 +00:00
Greg Stein
2cc4a60a59 apr_put_os_file() expected the caller to have an existing file or init to
NULL. using an existing file doesn't normally work: where would you get a
blank file to shove an FD into? expecting the user to assign to NULL is
error-prone (mod_isapi didn't).

*) always create and return a new file from apr_put_os_file()
*) reimplement apr_open_stderr() in terms of apr_put_os_file()
   [ except for win32... some issues there ]
*) remove some (obsolete) inits to NULL


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87851 13f79535-47bb-0310-9956-ffa450edef68
2001-01-26 09:05:40 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00
Doug MacEachern
40391fb9f2 adjust remaining modules to use the new handler hook method (Alan Edwards)
bring back the old handler prototype by reusing r->handler (dougm)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87617 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 23:55:12 +00:00
Ben Laurie
45f620672d Make handlers use hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87604 13f79535-47bb-0310-9956-ffa450edef68
2001-01-07 19:55:59 +00:00
Jeff Trawick
b3ec25393c mod_cgi: Fix some problems where the wrong error value was being traced
(errno instead of apr_status).

mod_cgid: Keep some of the code in synch with the version in mod_cgi.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87576 13f79535-47bb-0310-9956-ffa450edef68
2001-01-03 20:03:48 +00:00
Ryan Bloom
3c4d977fbe Change a bunch of mallocs in mod_cgid to apr_palloc. These were never
getting freed, and using malloc.  This was safe, because we were in
the CGID process, but pools are just safer here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87569 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 17:57:42 +00:00
Ryan Bloom
672c91791d Get mod_cgid to use apr calls for creating the actual CGI process.
This also allows mod_cgid to use ap_os_create_priviledged_process,
thus allowing for SuExec execution from mod_cgid.  Currently, we do
not support everything that standard SuExec supports, but at least
it works minimally now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87524 13f79535-47bb-0310-9956-ffa450edef68
2000-12-23 07:09:01 +00:00
Jeff Trawick
05be6a6716 Straighten up the first-time-through check in mod_cgid and add a CHANGES
entry for the bug fixes to mod_rewrite and mod_cgid.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87330 13f79535-47bb-0310-9956-ffa450edef68
2000-12-13 13:30:40 +00:00
Jeff Trawick
64bb50e427 Get mod_cgid to work as a DSO by changing the way it
keeps track of whether or not its post config hook has
been called before.  Instead of a static variable (which
is replaced when the DSO is loaded a second time), use
userdata in the process pool.

Still to go: mod_file_cache, mod_rewrite


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87321 13f79535-47bb-0310-9956-ffa450edef68
2000-12-13 04:03:19 +00:00
Jeff Trawick
a3d09c32f7 Change a couple of socket call failures from 404 errors to
500 errors.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87305 13f79535-47bb-0310-9956-ffa450edef68
2000-12-12 20:34:20 +00:00
Jeff Trawick
ca4c6afa60 Fix a comparison with ENOENT which was accidently broken during
the canonical error cleanup.

We wish to avoid reporting the boring error where we try to unlink
a socket which doesn't already exist.  We only want to report
interesting stuff.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87298 13f79535-47bb-0310-9956-ffa450edef68
2000-12-12 12:01:38 +00:00
Jeff Trawick
85815fec74 Clean up some of the warnings from a Tru64 build, mostly due to
the recent apr_ssize_t->apr_size_t changes.  The problem in mod_cgid
was an int function which didn't have a return statement.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86934 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 03:50:16 +00:00
Ryan Bloom
50758ecf68 Fix a lot of the fallback from the apr_ssize_t to apr_size_t change
Submitted by:	Victor J. Orlikowski <v.j.orlikowski@gte.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86915 13f79535-47bb-0310-9956-ffa450edef68
2000-11-10 19:01:33 +00:00
Manoj Kasichainula
b1fb90877e Add back suexec support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86712 13f79535-47bb-0310-9956-ffa450edef68
2000-10-23 15:30:57 +00:00
William A. Rowe Jr
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00
Jeff Trawick
2f6f8a66fd mod_cgid: In the handler, shut down the Unix socket (only for write)
once we finish writing the request body to the cgi child process;
otherwise, the client doesn't hit EOF on stdin.  Small request bodies
worked without this change (for reasons I don't understand), but large
ones didn't.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86574 13f79535-47bb-0310-9956-ffa450edef68
2000-10-13 03:38:35 +00:00
Ryan Bloom
999d08b62b These BUFFs aren't used anymore, so they should be removed from the
cgid module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86558 13f79535-47bb-0310-9956-ffa450edef68
2000-10-12 04:12:52 +00:00
Ryan Bloom
4b7bc4b099 Fix some types in the latest tree, so that AIX builds cleanly again.
Submitted by:   Victor J. Orlikowski <v.j.orlikowski@gte.net>
Reviewed by:    Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86484 13f79535-47bb-0310-9956-ffa450edef68
2000-10-09 19:03:27 +00:00
William A. Rowe Jr
7775df3222 Completed review for new tests:
APR_STATUS_IS_EACCES(s)
    APR_STATUS_IS_EEXIST(s)
    APR_STATUS_IS_ENAMETOOLONG(s)
    APR_STATUS_IS_ENOENT(s)

  Where the old EACCES et. al. still exist, we have a problem (not yet
  using APR at all)

  More to come...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86417 13f79535-47bb-0310-9956-ffa450edef68
2000-10-06 17:52:46 +00:00
Jeff Trawick
c6dc6d8f74 Provide a socklen_t to the user of APR as a portability aid. Some
systems have unsigned sockaddr len parameters; others have signed.
When passing the length by address (as to accept()) a warning is
generated if the sign is not correct.

This patch assumes that, if no native socklen_t is provided,
apr_socklen_t is always signed; that can be easily tweaked for
certain platforms later.

Inside APR, apr_socklen_t is only used currently in the Unix
implementation.
Submitted by:	Victor J. Orlikowski <v.j.orlikowski@gte.net>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86282 13f79535-47bb-0310-9956-ffa450edef68
2000-09-22 11:37:05 +00:00
Ryan Bloom
29e68ae602 Change r->filters to r->output_filters. This sets things up for us to
put input filters into Apache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86246 13f79535-47bb-0310-9956-ffa450edef68
2000-09-18 01:24:55 +00:00
Jeff Trawick
1cf8754218 Explictly close the AF_UNIX socket to the cgid child after nph cgis too.
(Yeah, it got closed during pool cleanup, but it is more understandable if
it is closed the same way for nph and !nph cgis.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86203 13f79535-47bb-0310-9956-ffa450edef68
2000-09-12 14:48:49 +00:00
Jeff Trawick
902d1cc240 The apr_file_t representation of the Unix socket from which we read
the CGI output should live in the request pool, not in pcgi.  pcgi (in
the httpd processes, at least) isn't cleaned up until we restart httpd.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86201 13f79535-47bb-0310-9956-ffa450edef68
2000-09-11 21:37:27 +00:00
Ryan Bloom
2d9c1ecabf Modify mod_cgid to use bucket brigades. This means that mod_cgid behaves
like mod_cgi, creating a single element bucket brigade that is passed to
the next filter.  This is instead of making mod_cgid read from the socket,
and call ap_r* repeatedly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86198 13f79535-47bb-0310-9956-ffa450edef68
2000-09-11 00:30:02 +00:00
Ryan Bloom
ae7cca1bd9 Remove IOLs from Apache. They are no longer necessary, now that we have
filtering beginning to work.  There is a hack that has been repeated
through this patch, we morph a pipe into a socket, and put the socket
into the BUFF.  Everytime we do that, we are working with a pipe from
a CGI, and we should be creating a pipe bucket and passing that bucket
back.  Because we don't actually have pipe buckets yet, we are using this
hack.  When we get pipe buckets, this will be fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68
2000-08-23 00:01:58 +00:00
Jeff Trawick
15a43f6956 Finish renaming AP_CTIME_LEN to APR_CTIME_LEN.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86009 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 12:15:57 +00:00
William A. Rowe Jr
1a9db204f5 Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +00:00
Jeff Trawick
4f7694bcad Don't trace EINTR errors from accept() on the Unix socket.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85979 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 23:47:58 +00:00
Doug MacEachern
059d8dd212 prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85976 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 05:27:38 +00:00
Jeff Trawick
ed49d74ae1 Include <strings.h> if we have it to get protos for strcase* on AIX.
Submitted by:	Victor J. Orlikowski <vjo@raleigh.ibm.com>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85965 13f79535-47bb-0310-9956-ffa450edef68
2000-07-31 17:22:01 +00:00