Commit Graph

152 Commits

Author SHA1 Message Date
e4fe63f3df Make mod_cgi and mod_include work when compiled as DSO's again. This is
accomplished by moving suexec out of it's own file and into unixd.[ch].
The problem was that suexec.c wasn't being linked into the server unless
a module was actually using ap_os_create_process.  This is still not clean,
but it works now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86772 13f79535-47bb-0310-9956-ffa450edef68
2000-10-31 00:47:24 +00:00
1db4cfe425 Fix a const problem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86766 13f79535-47bb-0310-9956-ffa450edef68
2000-10-30 19:30:55 +00:00
5c59c9a5b1 Ok here it is: Win32 utf-8 native unicode filename support.
There are just too many folks to credit... so this goes out from
  the entire ApacheCon hacking team :-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86740 13f79535-47bb-0310-9956-ffa450edef68
2000-10-25 02:46:40 +00:00
8e5cf24494 Fix foobar
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86720 13f79535-47bb-0310-9956-ffa450edef68
2000-10-23 19:02:41 +00:00
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
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
0c6f3b11ce Document more bad Win32 behavior... if the url isn't .exe, then don't
throw an .exe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86606 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 03:37:20 +00:00
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
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
eaba82f661 Regardless of reaction to a symbol rename -within- the sources, these
external symbols change for clarity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86540 13f79535-47bb-0310-9956-ffa450edef68
2000-10-11 17:20:12 +00:00
7c0e6988cf MSVC Project Rename - ApacheModuleBleck.* is no longer... now mod_bleck.*
Reviewed by: rbb, stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86535 13f79535-47bb-0310-9956-ffa450edef68
2000-10-11 13:53:03 +00:00
8a0da4d6e5 Write all of the request body to the child, not just what the kernel
would accept on the first write.

Because the pipe is non-blocking (via setting an APR timeout), we
have to send in a loop.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86495 13f79535-47bb-0310-9956-ffa450edef68
2000-10-10 04:11:35 +00:00
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
3a68c04a77 Missed it... another canonical error fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86449 13f79535-47bb-0310-9956-ffa450edef68
2000-10-08 06:05:00 +00:00
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
6ebf77b96c Port over the config directory stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86409 13f79535-47bb-0310-9956-ffa450edef68
2000-10-05 22:35:08 +00:00
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
53285171d4 Fix parameter list to ap_pcfg_openfile().
(No, this doesn't get mod_info to compile...  No, I'm not working
on mod_info...  I happened to notice the bad call so I fixed it.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86260 13f79535-47bb-0310-9956-ffa450edef68
2000-09-20 14:11:22 +00:00
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
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
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
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
7ac6ab9f51 Use wrapper macros to avoid the verbosity of the AP_RING macros when
doing things with bucket brigades.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86185 13f79535-47bb-0310-9956-ffa450edef68
2000-09-09 06:48:10 +00:00
6d7be19c90 Reduce the manualarity of managing bucket brigade lists by using the
new AP_RING macros. Most of this commit is fairly pedestrian as you
would expect, but I had to redo the chunking filter because of the
amount of pointer juggling it did. I have done some minimal testing
of this patch and it seems to work.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86178 13f79535-47bb-0310-9956-ffa450edef68
2000-09-08 10:16:14 +00:00
5b3c8b1c32 Call ap_pass_brigade() *before* soaking up stderr. The normal CGI
is going to write a bunch of stuff to stdout and nothing to stderr.
Reading stderr before processing the stdout pipe can cause deadlock if
the CGI fills the kernel buffer for stdout because the CGI will stall
writing to stdout while the httpd process will stall reading from the
CGI's stderr.

The NPH CGI behavior was unchanged.  If this is still a problem for NPH
CGIs, it was a problem before filtering too.

Also, get rid of a couple of unused variables in cgi_handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86150 13f79535-47bb-0310-9956-ffa450edef68
2000-08-26 19:45:15 +00:00
d9ce6e33d5 Make CGI's use bucket brigades. This will only work with mod_cgi for the
time being.  The changes should apply equally to mod_cgid, but I haven't
had a chance to really try it yet.  This is definately sub-optimal as far
as performance is concerned.  The concepts are there, and the flags are
available for performance tuning, but I didn't want to really get too
enmeshed in it today.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86148 13f79535-47bb-0310-9956-ffa450edef68
2000-08-25 22:18:15 +00:00
fa2fa443b6 Fix a small typo and an incorrect type.
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@86140 13f79535-47bb-0310-9956-ffa450edef68
2000-08-23 18:06:00 +00:00
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
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
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
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
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
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
c266de9029 Remove iol_socket.h. This file had one declaration, and it makes more
sense for that declaraion to move to ap_iol.h.  This also modifies all of
the files that include iol_socket.h to include ap_iol.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85934 13f79535-47bb-0310-9956-ffa450edef68
2000-07-29 16:24:15 +00:00
d3bb567248 Use ap_note_subprocess() to register the mod_cgid daemon process for cleanup
so that it is killed at termination if it does not die when the parent gets
SIGTERM.  This change is to fix occasional problems where the process stays
around.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85917 13f79535-47bb-0310-9956-ffa450edef68
2000-07-28 18:15:21 +00:00
ce7a5bcaff Remove apr_strnatcmp.h. All of the functions prototyped in this file
have been moved to apr_strings.h.  This also modifes Apache to include
apr_strings.h instead of apr_strnatcmp.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85872 13f79535-47bb-0310-9956-ffa450edef68
2000-07-23 17:31:08 +00:00
22d9fbdec0 Move all APR functions related to strings to their own directory, and
create a new header for those functions.  This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85867 13f79535-47bb-0310-9956-ffa450edef68
2000-07-21 19:50:58 +00:00
510681a27d Get mod_cgid.c to compile on OS/390 again. It needs unistd.h
for STDERR_FILENO.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85862 13f79535-47bb-0310-9956-ffa450edef68
2000-07-19 18:04:24 +00:00
c4aeab10dc #ifdef APR_HAS_OTHER_CHILD to #if APR_HAS_OTHER_CHILD. Not tested.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85821 13f79535-47bb-0310-9956-ffa450edef68
2000-07-11 22:12:18 +00:00
6aa73a79bc Reimplement ap_send_fd. Eliminate ap_send_fd_length. If APR_HAS_SENDFILE is
defined but ap_sendfile fails with APR_ENOTIMPL, the BUFF implementation
of ap_send_fd will get a shot at serving the request.  This fix is
required to get Apache working on 95/98 again and can also be useful on
Unix systems where sendfile is available via a servicepack/fixpack/PTF
on a particular level of the OS (e.g., AIX 4.3.2 base does not include
sendfile but is is available with a PTF).

This fix also reimplements the mod_file_cache sendfile_handler using
ap_send_fd and sets the connection aborted flag if the sendfile fails.

Future modification... Add code to ap_send_fd to hijack any data in the
client BUFF structure and send it along with the sendfile.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85810 13f79535-47bb-0310-9956-ffa450edef68
2000-07-10 21:49:22 +00:00
7952200e83 Drastically increase the listen backlog for mod_cgid's unix socket. It
was pretty easy to hit ECONNREFUSED errors when the backlog was 5.

The backlog can be customized at build time if required.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85787 13f79535-47bb-0310-9956-ffa450edef68
2000-07-07 15:20:35 +00:00
51d0326577 Update mod_cgid to work with attach_iol_socket again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85772 13f79535-47bb-0310-9956-ffa450edef68
2000-07-05 23:43:40 +00:00
114fb2e4ac Combine some common code. Before this, all platforms implemented their
own iol_sockets using APR.  This just combines all of that code to a
common file and moves that file to main.  I have tested this with all of
the Unix MPM's, but I am willing to bet I missed something (Makefiles) for
Windows, and possibly moving some code for OS/2 and BeOS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85732 13f79535-47bb-0310-9956-ffa450edef68
2000-06-30 18:08:13 +00:00
b5c0ae056b Include strings.h for strcasecmp(), strncasecmp(), and bzero().
Include time.h for time().

This removes a bunch of compiler warnings with gcc -Wall on AIX.
Submitted by:	Jeff Trawick, Victor Orlikowski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85723 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 14:33:48 +00:00
8b17259223 Fix a couple of const warnings on Linux. This basically just defines
ap_strstr and ap_strstr_c, which make sure that things are const when
they need to be.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85687 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 19:31:42 +00:00
02a2200fd8 blast the old names for the status codes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85686 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 17:34:11 +00:00
2b5cf4ec3c Convert module and fix warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85642 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 20:47:01 +00:00
d287a7ea2e Fix warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85640 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 20:39:39 +00:00
d1185107ff Use the new command-handler initializer macros in some more modules.
Unfortunately, the resulting warnings are *not* all cleaned up.  Ten or
so warnings spill over to non-AP_DEBUG builds (but that just means that
there is a bigger pool of folks to resolve them, right?).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85627 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 11:31:54 +00:00
fd3e806b92 This patch solves several specific issues:
1.3.x truncated any open/command arguments following the %1 arg.
           so this patch adds the char** arguments to several functions

     1.3.x did not expand environment strings (%userprofile% etc.)
           *) This patch may still not do so, if we are running with a
              subset of the 'normal' environment for security reasons.

     1.3.x did not parse the extension itself (eg. the .pl key itself)
           for the command, failing the 'named' type (eg. perlscript),
           so this patch first tests the 'named' key, then the .ext key

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85623 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 03:48:25 +00:00