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

48 Commits

Author SHA1 Message Date
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
William A. Rowe Jr
2e8d8b0bdd A coworker discovered that really bogus path names segfault the server
on Win32.  ap_server_root_relative() doesn't have an apr_status_t result,
  so we are limited in what we can figure out - but 99.99% of the time,
  the file's path is just plain bogus.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93956 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 15:31:17 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Ian Holsman
5c5730b112 display a warning message if someone attempts to load
the same module twice

Submitted by:	Brian Pane <bpane@pacbell.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91830 13f79535-47bb-0310-9956-ffa450edef68
2001-11-10 18:14:58 +00:00
William A. Rowe Jr
bc65ac01c8 LoadFile(s) required by modules before they loaded weren't executed until
server initialization.  This patch assures all such loaded files occur as
  they are parsed.

Submitted by:	John Sterling <sterling@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91496 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 19:04:02 +00:00
Justin Erenkrantz
a8a56e00c5 Switch back to SIGUSR1 for graceful restarts on all platforms that
support it.  This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value.  All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.

On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads.  All later
versions of Linux/glibc don't have this problem.  (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.)  If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.

In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used.  This is left
as an exercise to the reader for now.

The docs need to be updated.  Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true.  Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.

Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91076 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 22:13:59 +00:00
Greg Stein
2c23513d9a correct the back-out of this change. it used to be ap_log_perror()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89291 13f79535-47bb-0310-9956-ffa450edef68
2001-06-07 10:38:13 +00:00
Victor J. Orlikowski
ceaaa461fe Ooopsie. Some unintended things slipped in.
Backing them out.
Sorry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89290 13f79535-47bb-0310-9956-ffa450edef68
2001-06-07 10:31:09 +00:00
Victor J. Orlikowski
d3feaed25f Generate httpd.exp on the fly.
This should allow DSOs to work on AIX, without the headache of maintaining
the httpd.exp file.
This is adapted from OS/2's generation of ApacheCoreOS2.def.
There exist a few bugs still:
    1) mod_dav and mod_proxy may not yet work, due to certain namespace issues.
    2) Some symbols may need to be added, a la core_header.def
Once these have been fixed, the old httpd.exp file will be deleted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89288 13f79535-47bb-0310-9956-ffa450edef68
2001-06-07 10:03:29 +00:00
Jeff Trawick
4798019ea4 Get rid of unnecessary apr_status_t variables in a couple of functions.
In load_file(), use apr_dso_error() instead of apr_strerror() to build
an error message after a apr_dso_load() failure.

PR:			6980


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88444 13f79535-47bb-0310-9956-ffa450edef68
2001-03-03 02:01:30 +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
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
Greg Stein
e0ecae2267 Use a typesafe function for access objects' pools.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87812 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 08:26:19 +00:00
William A. Rowe Jr
a39d930bda Kill an unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87747 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 22:29:11 +00:00
Ryan Bloom
dad396617a Rely on the APR dso_load cleanup to unload the DSO correctly. There is
no reason for mod_so to register a second cleanup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87737 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 17:17:04 +00:00
William A. Rowe Jr
de65e8cd0e 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.

  This needs further review, it's committed only as a stopgap for those
  who's builds I broke, sorry.  Review tbc late this evening.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87699 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 22:04:45 +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
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
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
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
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
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
d5ee92d684 Use ap_dso_error() instead of ap_strerror() when ap_dso_sym() fails.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85946 13f79535-47bb-0310-9956-ffa450edef68
2000-07-30 02:03:42 +00:00
Ryan Bloom
e3702116a5 Update mod_so to use the new command_rec format.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85885 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 19:52:37 +00:00
William A. Rowe Jr
2ea44150e8 Undo my damage.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85882 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 03:40:24 +00:00
William A. Rowe Jr
fc3580dd3b Missing apr_strings.h - hope this wasn't destined for some global header.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85877 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 00:58:22 +00:00
Greg Stein
24c8105bc7 ap_dso_init() isn't needed. if/when a platform needs it, then
ap_initialize() can be used to init DSO support. or set up a lazy
    initialization for it.
solves the questions, "when do I call it? can I call it more than once?"

Submitted by: Ben Collins-Sussman <sussman@red-bean.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85849 13f79535-47bb-0310-9956-ffa450edef68
2000-07-15 01:07:42 +00:00
Brian Havard
4d401b51b1 Rework DSO error reporting to be more flexible & informative.
This patch covers os/2, unix & win32. Other platforms still need some
adjustment (BeOS, AIX).

Reviewed by:	rbb, gstein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85357 13f79535-47bb-0310-9956-ffa450edef68
2000-05-31 02:30:30 +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
Greg Stein
e3a862aeeb oops. somebody snuck different names for my_error, and I goofed a sizeof().
fixed some indents.
rename some 'stat' variables to 'status'
use ap_strerror() in load_file()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85225 13f79535-47bb-0310-9956-ffa450edef68
2000-05-16 02:57:00 +00:00
Greg Stein
46a6b50a23 do not canonicalize errors for ap_strerror(). use sizeof() rather than
a bare constant.

Submitted by: Brian Havard
Reviewed by: Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85224 13f79535-47bb-0310-9956-ffa450edef68
2000-05-16 02:49:42 +00:00
Ryan Bloom
534e7aa08f Make mod_so use ap_strerror instead of the old ap_os_dso_error. The
error codes for dso's will need to be added to strerror in order for
this to work fully.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85218 13f79535-47bb-0310-9956-ffa450edef68
2000-05-15 21:41:56 +00:00
Ryan Bloom
66826a60ab Commit the EXEC_ON_READ changes. This allows modules to hook into the
config file read phase.  Full details are in the CHANGES file blurb.
Examples to see how this should be used are provided for <IfModule>
<IfDefine> LoadModule, AddModule and ClearModuleList expect docs in the
next day or two.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85217 13f79535-47bb-0310-9956-ffa450edef68
2000-05-15 19:21:40 +00:00
Doug MacEachern
8d22638604 report dso_error if any
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85052 13f79535-47bb-0310-9956-ffa450edef68
2000-04-27 04:15:48 +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
Bill Stoddard
ca0f151736 Get DSOs working on Windows. Required cross platform change to mod_so.c.
Tim tested on Windows. Not tested on other platforms.

Submitted by:	Tim Costello
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84920 13f79535-47bb-0310-9956-ffa450edef68
2000-04-05 15:45:33 +00:00
Bill Stoddard
2e7ac8ac5f Get APR DSO code working under Windows
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84898 13f79535-47bb-0310-9956-ffa450edef68
2000-04-03 20:41:14 +00:00
David Reid
9cfe627f55 First pass at mod_so with the new APR dso calls. It builds OK, but as
I can't build any dynamic modules to properly test it with I'll let
others do that!  It'll need some work, but I wanted to get code in so
people can start hacking it around :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84893 13f79535-47bb-0310-9956-ffa450edef68
2000-04-02 18:15:00 +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
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
Bill Stoddard
46630ce8f2 Fix Windows compile breakage.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84507 13f79535-47bb-0310-9956-ffa450edef68
2000-01-21 19:24:46 +00:00
Ryan Bloom
e0ff64c186 Finish the conversion from fprintf(stderr -> ap_log_err.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84135 13f79535-47bb-0310-9956-ffa450edef68
1999-11-19 18:49:20 +00:00
Brian Havard
c9cedfaaf8 Make mod_so.c compile. Loading modules crashes for me though, haven't figured
out why yet....


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84117 13f79535-47bb-0310-9956-ffa450edef68
1999-11-14 06:07:40 +00:00
Martin Kraemer
8c18eee13a Remove most of the annoying "re ap_context_t mplement" mis-replacements
by what I think is their real meaning. Guys, I didn't verify all of this,
please have a close look at my "fixes". Thanks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83970 13f79535-47bb-0310-9956-ffa450edef68
1999-10-11 22:40:18 +00:00
Ryan Bloom
c37f14ddf3 Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83852 13f79535-47bb-0310-9956-ffa450edef68
1999-08-31 05:35:52 +00:00
Roy T. Fielding
c77235fe4e Replace comment about SIGUSR1 with SIGWINCH.
Submitted by:	Manoj Kasichainula


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83793 13f79535-47bb-0310-9956-ffa450edef68
1999-08-26 17:32:02 +00:00
Roy T. Fielding
e3e87d34a0 Apache 1.3.9 baseline for the Apache 2.0 repository.
Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9
Submitted by: Apache Group


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83751 13f79535-47bb-0310-9956-ffa450edef68
1999-08-24 06:55:44 +00:00