1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

224 Commits

Author SHA1 Message Date
Ryan Bloom
7808798c48 On Unix, we do not want to use an absolute path for CGI scripts. SuEXEC
will not let us use one, and when not using SuEXEC, we chdir() into the
correct directory.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87537 13f79535-47bb-0310-9956-ffa450edef68
2000-12-27 23:30:07 +00:00
Allan K. Edwards
73c6ea589f Get exe CGI's working again on Windows
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87359 13f79535-47bb-0310-9956-ffa450edef68
2000-12-15 15:02:38 +00:00
Greg Stein
e980d3f135 *) sprinkle a little magic "const" dust around (specifically, to compensate
for the prototype change to ap_os_create_privileged_process())
*) wrap some long lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87095 13f79535-47bb-0310-9956-ffa450edef68
2000-11-27 22:30:34 +00:00
Greg Stein
ead2dae94c *) Compensate for recent changes in the APR headers. Specifically, some
files need to specifically include stdio.h, or a particular apr_*.h
   header.

*) Adjust callers of apr_create_process() to deal with the extra "const"

*) Add "const" to args of ap_os_create_privileged_process()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87080 13f79535-47bb-0310-9956-ffa450edef68
2000-11-26 04:47:43 +00:00
William A. Rowe Jr
4bdc763772 Cleanup more compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87010 13f79535-47bb-0310-9956-ffa450edef68
2000-11-18 15:12:47 +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
William A. Rowe Jr
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
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
William A. Rowe Jr
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
Jeff Trawick
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
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
Tony Finch
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
Tony Finch
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
Jeff Trawick
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
Ryan Bloom
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
Ryan Bloom
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
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
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
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
Ryan Bloom
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
Jeff Trawick
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
Greg Stein
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
Ben Laurie
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
William A. Rowe Jr
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
Ryan Bloom
6bd252eeb5 Nothing in Apache should be calling stat anymore, so we can remove
the check for sys/stat.h and all references to the resulting macro.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85526 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 04:17:45 +00:00
Ryan Bloom
3c8e0cb24f Add the resource limiting code back to Apache 2.0. This only works on
Unix because I can't find any other platforms with rlimit.  If there are
other platforms that need this code, then some of the code needs to move.
This has just barely been tested, so it could probably use some good
testing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85449 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 21:45:16 +00:00
Jeff Trawick
71a767ce58 Fix zombie process problem with mod_cgi. This problem was introduced
as part of the "Convert ap_proc_t to a complete type." enhancement.

mod_cgi previously declared a ptr to an ap_proc_t, storage was allocated
by ap_create_process() from the request pool, and the ap_proc_t address
was passed to ap_note_subprocess().

With the "Convert ap_proc_t to a complete type." change, ap_proc_t
lived in autodata, but the address was still passed to
ap_note_subprocess().  When the pool was cleaned up, the ap_proc_t
in autodata had been used for something else, so the contents were
garbage, but pool cleanup needed the contents, especially the os
pid to pass to waidpid().  Since this was garbage, we never reaped
status from the cgi child and thus the cgi child remained a zombie.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85441 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 05:58:16 +00:00
Jeff Trawick
04974955dc Make the string in a log message unique so we know
what failed.  Before, "couldn't create child process: " was
used for a couple of different logs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85428 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 20:51:11 +00:00
Jeff Trawick
43c2b45f38 EBCDIC: Rearrange calls to ap_checkconv() so that most handlers
won't need to call it.
Submitted by:	Greg Ames, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85397 13f79535-47bb-0310-9956-ffa450edef68
2000-06-03 22:41:01 +00:00
Jeff Trawick
9ef87c2f05 mod_cgi: Make ScriptLog directive work again by fixing the
flags passed to ap_open().

TODO: Roll recent mod_cgi logging changes into mod_cgid.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85392 13f79535-47bb-0310-9956-ffa450edef68
2000-06-03 14:31:34 +00:00
Jeff Trawick
822f0dc143 mod_cgi: Restore logging of stderr from child process when ScriptLog
isn't used (as in 1.3), except that on Unix it is now logged via
ap_log_rerror() instead of by the child having STDERR_FILENO refer
to the error log.
Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85331 13f79535-47bb-0310-9956-ffa450edef68
2000-05-28 11:48:24 +00:00
William A. Rowe Jr
da493b8be1 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out all _EXPORT_VAR changes back to their original _VAR_EXPORT
  names for linkage (API_, CORE_, and MODULE_).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85318 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:40:44 +00:00
William A. Rowe Jr
86e2a18f2a This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations.  As with
  the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
  and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

  I will be happy to revert the inclusion of ap_config.h from 
  httpd.h if this bothers anyone.  More individual modules need
  to be patched if we do so.

  The API_EXPORTs all moved into central storage in the ap_config.h
  header.  Without WIN32 or API_STATIC compile time declarations, 
  these macros remain no-ops.

  This patch also moves the following data from http_main to http_config:

    const char *ap_server_argv0;
    const char *ap_server_root;
    ap_array_header_t *ap_server_pre_read_config;
    ap_array_header_t *ap_server_post_read_config;
    ap_array_header_t *ap_server_config_defines;

  And the following variables had already moved into ap_hooks.c:

    ap_pool_t *g_pHookPool;  (initialized now in http_config)
    int g_bDebugHooks;                   (out of http_config)
    const char *g_szCurrentHookName;     (out of http_config)

  The changes to http_main.c are in preparation for that module to
  move out to a seperate .exe for win32.  Other platforms will be
  unaffected, outside of these changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:28:02 +00:00
Ryan Bloom
6c75ebc1da Rename stdin, stdout, stderr from new ap_proc_t to in, out, and err because
Windows was having problems with the original names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85285 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 00:15:09 +00:00
Ryan Bloom
f9f4c470a8 Convert ap_proc_t to a complete type. This lets us access the pid directly.
Only the prefork MPM has been ported so far, the rest of the Unix MPM's are
coming later today.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85279 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 21:04:03 +00:00
Manoj Kasichainula
aec887ec5e Remove all remaining instances in Apache code of
ap_{block,unblock}_alarms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85265 13f79535-47bb-0310-9956-ffa450edef68
2000-05-21 05:31:09 +00:00
Bill Stoddard
a55a5064ef Update a couple of modules to use ap_stat() rather than stat().
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85232 13f79535-47bb-0310-9956-ffa450edef68
2000-05-16 20:19:29 +00:00
Ryan Bloom
07f387cc5a Add logic to timeout CGI scripts properly. This requires that APR pipes
can be timed out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84986 13f79535-47bb-0310-9956-ffa450edef68
2000-04-18 00:08:30 +00:00
Ryan Bloom
de3a77dc01 Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84963 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 15:59:20 +00:00
Ryan Bloom
db9d037c36 Make the server work without asking for buffered file I/O. This removes
all APR_BUFFERED flags from the server, and it fixes a minor bug in the
ungetchar patch (I forgot a file when comitting).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84933 13f79535-47bb-0310-9956-ffa450edef68
2000-04-06 23:53:59 +00:00
Roy T. Fielding
2bee4ad19d Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84879 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 09:05:25 +00:00
Ryan Bloom
63f93a6504 Backout layered I/O changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84842 13f79535-47bb-0310-9956-ffa450edef68
2000-03-27 16:22:30 +00:00
Ryan Bloom
6a4d775449 Enabled layered I/O. Docs are forthcoming.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84837 13f79535-47bb-0310-9956-ffa450edef68
2000-03-25 15:00:10 +00:00
Ryan Bloom
b1c26f031a Fix all the License issues. Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84725 13f79535-47bb-0310-9956-ffa450edef68
2000-03-10 00:07:37 +00:00
Ryan Bloom
74bb38f449 Add a test program for pipes. Add support for non-buffered CGI's to mod_cgi.
This still doesn't terminate CGI's after a time limit, that's the next step.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84687 13f79535-47bb-0310-9956-ffa450edef68
2000-03-01 16:21:21 +00:00
Bill Stoddard
6461b73f21 Set up return codes correctly in the failure case.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84617 13f79535-47bb-0310-9956-ffa450edef68
2000-02-13 00:39:04 +00:00
Ryan Bloom
505fa49a3a Manoj has been pushing for this for a while, but I've been too dense
to understand that he was right.  :-)  Basically, this makes the modules
use ap_config to test for header file inclusion.  This method is not to
be used for larger modules that run autoconf theirselves.  Including
ap_config is only valid for modules which rely on Apache to do their
configuration.  Currently, this is only the core modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84497 13f79535-47bb-0310-9956-ffa450edef68
2000-01-19 02:42:17 +00:00
Ryan Bloom
70a4fae036 This is a huge change to the configure system. Basically, this name space
protects most, if not all, of the Apache macros.   This has been tested on
Linux using all of the Unix MPM's.  The biggest push was that Apache's
httpd.h header file can no longer include the ap_config.h file.  Most of the
other files include this themselves now.
Submitted by:	Ryan Bloom and Manoj Kasichainula


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84492 13f79535-47bb-0310-9956-ffa450edef68
2000-01-18 23:41:56 +00:00
Brian Havard
0df3ec32ca Rework ap_finfo_t to split the file type out of the protection field.
I've taken a stab at the unix implementation but tested only on OS/2.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84416 13f79535-47bb-0310-9956-ffa450edef68
2000-01-10 15:35:51 +00:00