Commit Graph

57 Commits

Author SHA1 Message Date
0cc2db9987 Add pre_config hooks back in for all modules. This is important for the
server tokens code that is coming soon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85378 13f79535-47bb-0310-9956-ffa450edef68
2000-06-02 15:33:20 +00:00
782de3b8d3 Forward fit a bug fix in the TAKE13 handling from 1.3 to 2.0
Submitted by:	Jon Travis <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85353 13f79535-47bb-0310-9956-ffa450edef68
2000-05-30 15:56:18 +00:00
1d642bab66 We now report the correct line number for syntax errors in config
files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85348 13f79535-47bb-0310-9956-ffa450edef68
2000-05-30 02:42:32 +00:00
f7e32fc893 PR:
Obtained from:
Submitted by:
Reviewed by:

  Finally a patch that can't (well, shouldn't :-) break any other platform.

  Open up the symbols defined for http_main.c to move main() from the core
  under Win32 (that's the real main(), not that apache_main() thing).

  Win32 Project file changes will follow in a seperate patch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85326 13f79535-47bb-0310-9956-ffa450edef68
2000-05-28 03:52:42 +00:00
3f29977506 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out additional linkage argument from DECLARE_HOOK
  and IMPLEMENT_HOOK macros.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85319 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:53:48 +00:00
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
ff26991747 A really simple change for readability:
ap_pool_t *g_pHookPool;           becomes ap_global_hook_pool
    int g_bDebugHooks;                becomes ap_debug_module_hooks
    const char *g_szCurrentHookName;  becomes ap_debug_module_name

  Just as a reminder, these are now declared in ap_hooks.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85310 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:31:34 +00:00
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
e9380c4c1e Fix the config parser so that if there is no current node, and we are
evaluating an EXEC_ON_READ directive, and the directive's sub_tree is empty,
we don't try to set the node's parent pointer.  This stops a seg fault.
Submitted by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85269 13f79535-47bb-0310-9956-ffa450edef68
2000-05-22 02:57:44 +00:00
ceec7e2831 Fix a bug in adding EXEC_ON_READ at the top level of the tree.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85259 13f79535-47bb-0310-9956-ffa450edef68
2000-05-19 17:22:47 +00:00
7245baa87c Fix a bug in the EXEC_ON_READ logic. When we build a sub_tree while
reading that is the first item in a container, we have to return that tree
and set the parent pointers correctly.
Submitted by:	Jeff Trawick
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85233 13f79535-47bb-0310-9956-ffa450edef68
2000-05-16 22:16:51 +00:00
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
0f9eaa5557 Get tree build to work correctly with config Include directive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85172 13f79535-47bb-0310-9956-ffa450edef68
2000-05-09 22:46:03 +00:00
6644b34387 add AP_ prefix to *HOOK* macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85045 13f79535-47bb-0310-9956-ffa450edef68
2000-04-26 07:14:39 +00:00
b97ec4c63a drop the "container" param from ap_walk_config(). callers should simply
pass the first child, rather than expecting the walker to do it.
remove the nasty "static" variable inside ap_walk_config(). it now walks the
    tree provided with no worries about bumping up/down levels.
minor refactor between ap_walk_config() and ap_walk_config_sub() to clean up
    some logic and clarify the code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85025 13f79535-47bb-0310-9956-ffa450edef68
2000-04-24 12:27:02 +00:00
c2c13c67c3 clean up cmd_parms: config_file is no longer valid; end_token is bogus;
add directive.
move configfile_t and functions from httpd.h to http_config.h
new signature for ap_build_config() (since config_file removed from cmd_parms)
add "data" to ap_directive_t for future use by modules. add filename.
syntax checking for section-close directives: a section-open must exist,
    the section-close must be </FOO>, and the open/close must match.
    the file as a whole must be properly balanced (issue errors for each
    unmatched section-open).
</FOO> command_rec structures are obsolete. Remove from http_core.c.
do not store </FOO> directives in the config tree.
clean out section-close logic from http_core.c (and old, related comments)
<Limit> and <LimitExcept> must walk their children.
new mechanism in ap_check_cmd_context() for testing enclosure in a
    Directory/Location/File: find_parent()
<IfModule> and <IfDefine> must pass cmd->context when walking the children
several places: we had a walk followed by ap_get_module_config(). that
    assumed the walk would create a config that we could fetch, which is not
    true -- it is possible that the children are all from other modules
    (e.g. the <Files> section in httpd.conf-dist has no "core" directives).
    using ap_set_config_vectors() ensures we get a structure, and it returns
    it to us.
    [ note: when we had </Directory> (and friends) in the tree, the config
      would get created; removing the directive removed the config; this
      was a bitch to track down :-) ]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85024 13f79535-47bb-0310-9956-ffa450edef68
2000-04-24 12:00:43 +00:00
059ab7a790 handle error messages during building and processing of the configuration.
add missing return statements, wrap some lines, remove unused vars.
move syntax error reporting and exit(1) back to the right place (to be
    fixed in a future pass; the exit() is inappropriate for parsing
    .htaccess files).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85023 13f79535-47bb-0310-9956-ffa450edef68
2000-04-24 08:35:56 +00:00
ab31187b8d Parse the config tree, instead of the config file. This is a first step there
are some big improvements to be made to this code, but this works now, and
it is a first step.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85015 13f79535-47bb-0310-9956-ffa450edef68
2000-04-22 22:54:30 +00:00
f5b782f5b8 Use ap_canonical_error() where appropriate.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85000 13f79535-47bb-0310-9956-ffa450edef68
2000-04-20 15:20:33 +00:00
a27e83a881 Add back in logic to put the ending container directive in the tree. This
needs to be there until we have a validating tree.  Without this, it is
possible for a config file to read:

<Ifmodule mod_foo.c>
    some directive
</Limit>

and still be read correctly.  When the tree building functions can validate
for us, this should be removed, and there is a comment that says so.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84979 13f79535-47bb-0310-9956-ffa450edef68
2000-04-16 23:28:52 +00:00
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
59864841f2 more namespace cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84961 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 02:39:08 +00:00
ad33e9ead2 First step to getting configuration modules working. This step creates
a tree, but does not use the tree for anything.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84949 13f79535-47bb-0310-9956-ffa450edef68
2000-04-12 21:57:48 +00:00
057b29f829 Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84878 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 08:44:21 +00:00
69ad445e8b Fix the warnings associated with the pre_config patch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84864 13f79535-47bb-0310-9956-ffa450edef68
2000-03-30 18:39:46 +00:00
3fa139e050 Put the pre_config hook back into the table. This solves the problem of
the pre-config hook only being valid for MPM's.  This patch also
distinguishes between STANDARD modules and MPM's.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84862 13f79535-47bb-0310-9956-ffa450edef68
2000-03-30 15:30:36 +00:00
7205dc823f Remove the last piece of the layered I/O code. I don't know why this didn't
get removed with the rest of it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84845 13f79535-47bb-0310-9956-ffa450edef68
2000-03-28 18:36:34 +00:00
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
789a32d2f1 Clear hook registrations between reads of the config file.
When DSOs are unloaded and re-loaded the old hook pointers may
no longer be valid. This fix eliminates potential segfaults.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84828 13f79535-47bb-0310-9956-ffa450edef68
2000-03-23 14:48:45 +00:00
ad3cb55128 Eliminate implicit usage of access.conf and srm.conf.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84771 13f79535-47bb-0310-9956-ffa450edef68
2000-03-15 23:18:32 +00:00
99a9d6e3e0 Another one in the department of fairly useless patches which
are best described as feature creep. Allows ${ENV} constructs
in the config file. This avoids the need for mod_perl or
m4 cleverness whilst mainting some of the usefullness. It
does not do (of course) multiline things or anything that clever.

Feel free to flame me.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84765 13f79535-47bb-0310-9956-ffa450edef68
2000-03-14 14:09:52 +00:00
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
daa015381e Sort hooks after dynamically loaded modules have registered.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84658 13f79535-47bb-0310-9956-ffa450edef68
2000-02-22 16:02:29 +00:00
f8a7fce423 Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
defined correctly in all C files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84531 13f79535-47bb-0310-9956-ffa450edef68
2000-01-28 18:02:29 +00:00
a8ce196da5 Finish the commits for the change in the header files. Basically, this hides
all of the Apache macros that modules don't need access to.  This should
have been committed with the modules, but I wasn't paying attention to the
directory I was in when I ran the commit.
Submitted by:	Manoj Kasichainula and Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84493 13f79535-47bb-0310-9956-ffa450edef68
2000-01-19 01:16:31 +00:00
8f26ac7df4 Separate the stat structure from the file structure and use ap_stat and
ap_getfileinfo in apache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84397 13f79535-47bb-0310-9956-ffa450edef68
2000-01-06 14:43:41 +00:00
528afcc4d6 Initialize all ap_file_t's to NULL. This allows ap_open and ap_stat to
work together without causing memory leaks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84393 13f79535-47bb-0310-9956-ffa450edef68
2000-01-04 19:01:04 +00:00
dc89301b6e Use ap_open_stderr in http_config.c. This cleans up some non-portable
code that has been bothering me.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84281 13f79535-47bb-0310-9956-ffa450edef68
1999-12-11 20:29:17 +00:00
975ea85ea2 First step in removing the fprintf(stderr problem from Apache. Basically,
I defined APLOG_STARTUP, which refrains from printing the date string
and the log level information in log_error_core.  I then changed all the
fprintf(stderr calls to ap_log_error, and used APLOG_STARTUP.
log_error_core on Unix takes care of creating a log file and directing
it to stderr if a log file isn't already active.  I will continue to
make these changes tomorrow.  Currently, the main code and the dexter
mpm have been modified.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84134 13f79535-47bb-0310-9956-ffa450edef68
1999-11-18 23:07:53 +00:00
370fc31b00 Cleanup the ZZZ comments. Basically these used to mark places where APR
is needed.  It is much easier to do this conversion by hand than by
searching for old comments, so they are going away now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84128 13f79535-47bb-0310-9956-ffa450edef68
1999-11-16 18:32:05 +00:00
ade03101b9 Get rid of a number of 'incompatible pointer type' warnings using
ap_os_{get,put}_file() on platforms who's ap_os_file_t is not an int.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84109 13f79535-47bb-0310-9956-ffa450edef68
1999-11-08 06:05:50 +00:00
b0a727ce83 De-errno ap_pcfg_openfile().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84091 13f79535-47bb-0310-9956-ffa450edef68
1999-11-02 15:15:08 +00:00
482dcf3495 Add a status value to ap_log_error and ap_log_rerror. This allows us to use
apr_status codes in our error logs.  The main advantage of this, is portable
error codes.  Now, Windows will finally be able to use errno!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84007 13f79535-47bb-0310-9956-ffa450edef68
1999-10-20 12:50:12 +00:00
30d1160669 Typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83968 13f79535-47bb-0310-9956-ffa450edef68
1999-10-11 21:54:40 +00:00
cd06de1ce3 Well this was thought provoking.
Drive out the use of malloc in two places.

In listen.c, using the global process pool instead.  That changes the
API into listen so that a process is passed in rather than the config
pool.  That's all was easy.

The pain is propogating a change into all N of the mpm, they
are all similar but different in their use of listen.c  There
is a lot to dislike about similar but code scattered code.

I changed the N setup_listener routines, they now take only
the server since they can dig the config and global pool
out of there.

Free today: ap_setup_prelinked_modules now takes the process so it
can allocate it's table in the process's pool rathern than use
malloc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83943 13f79535-47bb-0310-9956-ffa450edef68
1999-10-07 20:48:26 +00:00
2921356fcf Add process_rec to the top of {server,connection,request}_rec
hierarchy of structs that abstract server activities.  Store some
stuff in process_rec (finally a place to have nearly guiltless
globals) for example the global and configuration pools.  Put some
operations on process_rec in http_main, in particular the
destroy_and_exit operation, and the use it to do all the exit calls.
Change ap_read_config to operation on this "object" rather than on the
configuration pool.  Modify server_rec to point to the process, so you
can get at it most all the time which should finally allow most of the
server's malloc calls to be eliminated.

There are no locks in the process struct as yet, put them in as needed.
Some of the hooks should take this rather than conf. pool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83942 13f79535-47bb-0310-9956-ffa450edef68
1999-10-07 18:13:17 +00:00
2b361ec557 First patch to re-order function parameters. This one gets the low hanging
fruit, and moves most of the result parameters to the first argument.
Future patches in this series will move the rest of the result parameters
to the beginning of the list, and will move the context's to the end of the
list


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83927 13f79535-47bb-0310-9956-ffa450edef68
1999-10-04 16:38:16 +00:00
69adf379b4 Remove all of the calls to functions like "ap_popenf". These functions were
moved down to APR, but they are being removed.  They are not portable, and
were only moved down for backwards compatability.  With this change, they can
be safely removed, which is the next commit on it's way.
Submitted by:  Ryan Bloom and Paul Reder


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83879 13f79535-47bb-0310-9956-ffa450edef68
1999-09-08 14:15:55 +00:00
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
bd3555a284 Fix merge bug
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83828 13f79535-47bb-0310-9956-ffa450edef68
1999-08-28 02:34:37 +00:00