1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

1009 Commits

Author SHA1 Message Date
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
Jeff Trawick
de8bb3686b Pass a valid pool to apr_create_lock().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87574 13f79535-47bb-0310-9956-ffa450edef68
2001-01-03 16:47:02 +00:00
Jeff Trawick
8ae90fca38 EBCDIC: Fix some byterange protocol data translation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87571 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 19:22:09 +00:00
Jeff Trawick
da47216709 Get mod_so to build again by including apr_general.h, which is where
the APR_GET_POOL() macro is defined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87570 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 18:32:49 +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
Ben Laurie
19519dff8a Generic hooks (and a demo content filter module).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87568 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 17:41:38 +00:00
Ryan Bloom
bc1891795e Modify a couple of calls to ap_log_error with a NULL server to use
ap_log_perror, and pass a pool.  The keeps us from seg faulting if the
error log hasn't been opened yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87565 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 01:34:05 +00:00
Ryan Bloom
ebbd77a687 We never use MMAP_SEGMENT_SIZE, and we are better off determining if we
have MMAP, by just checking with APR, instead of using an Apache
definition which doesn't really control anything anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87563 13f79535-47bb-0310-9956-ffa450edef68
2001-01-01 00:34:25 +00:00
Jeff Trawick
b9d820b570 Fix a segfault caused by mod_ext_filter when the external filter
program does not exist.

I wish I understood why I didn't hit this problem in the normal
case :(


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87551 13f79535-47bb-0310-9956-ffa450edef68
2000-12-29 14:11:12 +00:00
Jeff Trawick
b38b38dc22 ap_content_length_filter(): if ap_save_brigade() fails, tell the caller
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87549 13f79535-47bb-0310-9956-ffa450edef68
2000-12-29 13:59:19 +00:00
Jeff Trawick
c5e356d7cc Recognize a downstream error as such (instead of saying simply "returning error").
Trace the apr_status_t whenever helpful.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87547 13f79535-47bb-0310-9956-ffa450edef68
2000-12-29 13:51:38 +00:00
Ryan Bloom
74383a7cae Because we can't get APR_EAGAIN from sendfile if we have a timeout, we
can simplify this test now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87545 13f79535-47bb-0310-9956-ffa450edef68
2000-12-28 23:27:20 +00:00
Jeff Trawick
d21e75657c On EBCDIC machines, fix up the charset of the header terminator.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87542 13f79535-47bb-0310-9956-ffa450edef68
2000-12-28 22:23:34 +00:00
Ryan Bloom
d1df8342b5 Ignore CRLF (or LF) when PEEK'ing at data on the socket. The general
problem is that some browsers send an extra line at the end of a POST
request.  We use the PEEK method to determine if there is any data left
on the socket, if there is then we delay sending the response until we
have enough data to make it worthwhile.  If the browser sends an extra
blank line, we don't want to delay the response at all.  The only time
we use the PEEK method is to check for a second request, so this is safe
to do.

This also solves Joe Orton's problem of specifying a Content- Length
of 1 for a blank line, and having the server wait to send back a response.
The problem is that Linux (all Unix really) sends two characters \r\n for
a blank line, so specifying a C-L of 1 means that the server still sees
a \n when it PEEKs that the socket data.  That \n can be safely ignored
however.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87540 13f79535-47bb-0310-9956-ffa450edef68
2000-12-28 01:14:22 +00:00
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
Ryan Bloom
0ef67c93b0 Move the config.m4 file to config5.m4 in the generators directory so that
we can actually make the cgi module decision based on MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87527 13f79535-47bb-0310-9956-ffa450edef68
2000-12-26 22:46:09 +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
Ryan Bloom
39a2364a52 If we get EAGAIN returned from apr_sendfile, then we need to loop back and
call it again.  This change allows us to serve large files (such as
apache_2.0a9.tar.gz) using Apache 2.0 on FreeBSD.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87514 13f79535-47bb-0310-9956-ffa450edef68
2000-12-22 23:43:16 +00:00
Ryan Bloom
b9d06deea4 Allow the auth modules to load into the server.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87510 13f79535-47bb-0310-9956-ffa450edef68
2000-12-22 21:34:09 +00:00
William A. Rowe Jr
72a1fee16c OPTIONS request crashed server, this fixes it
Submitted by:	Joe Orton
Reviewed by:	W Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87504 13f79535-47bb-0310-9956-ffa450edef68
2000-12-21 21:09:56 +00:00
William A. Rowe Jr
8a5e3208d9 Last of the Win32 goodness I've noticed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87503 13f79535-47bb-0310-9956-ffa450edef68
2000-12-21 21:07:18 +00:00
William A. Rowe Jr
c876e8476a Out of the sandbox and into prime time. Note... these should always and
only be regenerated immediately prior to the tag and roll.  Do not assume
  they are current with the sources in the development tree.  They should
  be generated as vc5 make files, since only vc5 makefiles are readable by
  both vc5 and vc6.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87479 13f79535-47bb-0310-9956-ffa450edef68
2000-12-21 01:46:22 +00:00
Allan K. Edwards
e3cf0931a3 prevent crash when connection closed before complete request received
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87478 13f79535-47bb-0310-9956-ffa450edef68
2000-12-21 01:44:28 +00:00
William A. Rowe Jr
0a37cdf9fe Correction, commited the vc5. Need vc6 in the tree. Humble appologies.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87475 13f79535-47bb-0310-9956-ffa450edef68
2000-12-21 01:25:10 +00:00
William A. Rowe Jr
4315b0c706 The Win32 overhaul, in summary;
Modules are named mod_foo.so
    Dynamic Libraries are named libfoo.dll, and are stored in bin/
    The former ApacheCoreDll is now libhttpd.dll
    Apache.exe moves to bin/
    The make install now copies include, lib, and libexec
    All build options are normalized, filenames adjusted appropriately


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87471 13f79535-47bb-0310-9956-ffa450edef68
2000-12-21 01:04:49 +00:00
Greg Ames
8b80bbc18b Send HTTP status line in ascii from ebcdic boxes...makes browsers much happier.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87467 13f79535-47bb-0310-9956-ffa450edef68
2000-12-20 23:13:01 +00:00
Jeff Trawick
351725e726 Switch to the APR-provided APR_CHARSET_EBCDIC feature test macro.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87460 13f79535-47bb-0310-9956-ffa450edef68
2000-12-20 16:44:01 +00:00
Ryan Bloom
b2c9db9fbb Remove a warning on some platforms.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87426 13f79535-47bb-0310-9956-ffa450edef68
2000-12-19 19:44:16 +00:00
Ryan Bloom
b5440c348a Force all Apache functions to be linked into the executable, whether they
are used or not.  This uses the same mechanism that is used for APR
and APR-util.  This may not be the correct solution, but it works, and that
is what I really care about.  This also renames CHARSET_EBCDIC to
AP_CHARSET_EBCDIC.  This is for namespace correctness, but it also makes
the exports script a bit easier.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87424 13f79535-47bb-0310-9956-ffa450edef68
2000-12-19 17:05:48 +00:00
Ryan Bloom
772355e125 Get all of the auth modules to the point that they will install and
be loadable into the server.  Our new build/install mechanism expects
that all modules will have a common name format.  The auth modules
didn't use that format, so we didn't install them properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87422 13f79535-47bb-0310-9956-ffa450edef68
2000-12-19 15:09:02 +00:00
Jeff Trawick
50cca38301 Remove an IPv4 dependency in do_double_reverse() by calling
apr_getaddrinfo() instead of gethostbyname().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87402 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 20:31:17 +00:00
Jeff Trawick
c17ef15818 API routines ap_pgethostbyname() and ap_pduphostent() are no longer
available.  Use apr_getaddrinfo() instead.

The ap_pduphostent() code was moved to modules/proxy/proxy_util.c for
now since that is the only caller.  When the proxy's use of the
resolver is APR-ized this won't be needed anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87399 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 17:52:05 +00:00
Jeff Trawick
fbeea294ef Stop using apr_get_hostname(). It doesn't support IPv6 and it
is redundant.  apr_getnameinfo() provides the same function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87396 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 16:49:09 +00:00
Ryan Bloom
072741059e Make the server return HTTP_RANGE_NOT_SATISFIABLE if the all of the
requested ranges begin after the end of the response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87390 13f79535-47bb-0310-9956-ffa450edef68
2000-12-17 20:58:30 +00:00
Ryan Bloom
b34037db5e Get byterange requests working with data that is generated by a handler
that does not add a content-length.  For example, mod_autoindex doesn't
set a content-length, but the byterange filter requires one.  We fix this
by computing the content-length in the byterange filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87389 13f79535-47bb-0310-9956-ffa450edef68
2000-12-17 18:04:14 +00:00
Ryan Bloom
40eae41078 Rename the apr_opendir symbol to apr_dir_open. This makes more sense,
and the rename was proposed a while ago inside of APR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87385 13f79535-47bb-0310-9956-ffa450edef68
2000-12-17 03:35:39 +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
Jeff Trawick
b1e8b050e9 The local_addr and remote_addr fields in the conn_rec are now
apr_sockaddr_t * instead of sockaddr_in.  This is a small step
towards IPv6 support.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87342 13f79535-47bb-0310-9956-ffa450edef68
2000-12-14 18:47:30 +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
78309d6d21 Get rid of the once_through flag. It is never used and doesn't work
in DSO mode anyway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87329 13f79535-47bb-0310-9956-ffa450edef68
2000-12-13 13:22:51 +00:00
Jeff Trawick
22a2fa9ddb Get mod_rewrite 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87328 13f79535-47bb-0310-9956-ffa450edef68
2000-12-13 13:03:32 +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
Greg Stein
84e6349ae0 sdbm.h is now apr_sdbm.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87296 13f79535-47bb-0310-9956-ffa450edef68
2000-12-12 08:56:26 +00:00
Jeff Trawick
32afc7966d config.m4: support mod_ext_filter (I'd been using --with-module
until the recent build changes)
mod_ext_filter.c: get rid of a warning


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87287 13f79535-47bb-0310-9956-ffa450edef68
2000-12-11 19:02:15 +00:00
William A. Rowe Jr
4e842d60f1 The feature macro may appear a bit odd. I'm open to any better suggest.
Define AP_AUTH_DBM_USE_APR for apr dbm access, and apply the symbol to
  the win32 build.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87265 13f79535-47bb-0310-9956-ffa450edef68
2000-12-08 18:27:53 +00:00
William A. Rowe Jr
a0087fb494 Back out the .dsp changes (my bad - jumped to fast.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87263 13f79535-47bb-0310-9956-ffa450edef68
2000-12-08 17:39:25 +00:00
William A. Rowe Jr
9af3de80e5 Adjustments to dav for apr_dbm_open args change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87262 13f79535-47bb-0310-9956-ffa450edef68
2000-12-08 17:38:05 +00:00
Ryan Bloom
02ce223e3a Get Apache filters and Apr-util buckets using the same values for
blocking and non-blocking reads.  This allows us to use the mode parameter
passed to a filter to read from the bucket correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87256 13f79535-47bb-0310-9956-ffa450edef68
2000-12-08 01:26:31 +00:00