1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-26 05:42:34 +03:00
Commit Graph

85 Commits

Author SHA1 Message Date
Ryan Bloom
b62a882802 Port mod_info to 2.0. This is basically a complete re-write to use the
config tree instead of re-reading the config file.  As a part of this
change, the config tree needs to be exposed to modules as ap_conftree.
Submitted by:	Ryan Morgan <rmorgan@covalent.net>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86948 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 01:55:26 +00:00
William A. Rowe Jr
bdf3f917c0 Solve the os_is_absolute_path problem for the moment.
This is -not- the permanent patch for 2.0, simply a placeholder till we
  have the canonical name implemented in APR for good.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86804 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 20:05:00 +00:00
William A. Rowe Jr
37a90cb777 Get Win32 building again.
Submitted by:	John Sterling <sterling@covalent.net>
Reviewed by:	wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86797 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 04:46:42 +00:00
Ryan Bloom
7d9a83ff92 Make mod_auth_db compile cleanly in 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86768 13f79535-47bb-0310-9956-ffa450edef68
2000-10-30 20:13:04 +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
Jim Jagielski
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
William A. Rowe Jr
01f4c4f960 The lots of little ones... APR_IS_STATUS_condition(rv) conditional macros
replacing the majority of fallible rv == APR_condition tests.  But there
  are lots more to fix, these are the obvious ones that already did proper
  canonical error conversion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86405 13f79535-47bb-0310-9956-ffa450edef68
2000-10-05 17:33:14 +00:00
Jeff Trawick
21d948e6bc Avoid a segfault when parsing .htaccess files. An
uninitialized tree pointer was passed to ap_build_config().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86265 13f79535-47bb-0310-9956-ffa450edef68
2000-09-20 17:35:59 +00:00
Jeff Trawick
2a2e34443e Fix a bug parsing configuration file containers. With a sequence
like this in the config file

       <IfModule mod_kilroy.c>
       any stuff
       </IfModule>
       <IfModule mod_lovejoy.c>
       (blank line)
       any stuff
       </IfModule>

the second container would be terminated at the blank line due to
sediment in the buffer from reading the prior </IfModule> and an
error message would be generated for the real </IfModule> for the
second container.  Also due to this problem, any two characters
could be used for "</" in the close of a container.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86233 13f79535-47bb-0310-9956-ffa450edef68
2000-09-15 16:50:39 +00:00
Ryan Bloom
b0f3a1dfcb Remove a bunch of warnings from the server when compiled using
--with-maintainer-mode


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86070 13f79535-47bb-0310-9956-ffa450edef68
2000-08-14 03:07:58 +00:00
Ken Coar
db1852bded Preset the cmd_parms->limited field to the magic 'no limit active'
value, and add some prototype API routines for expanding support
	for arbitrary extension HTTP methods.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86053 13f79535-47bb-0310-9956-ffa450edef68
2000-08-11 23:41:53 +00:00
Jeff Trawick
127fc59162 Fix a config tree problem.
The following configuration file demonstrates the problem:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap    quux-map       prg:/tmp/apache-2.0/map.quux.pl
RewriteRule   ^/~quux/(.*)$  /~quux/${quux-map:$1}
</IfModule>

After this config file is parsed, the only statement in the config
tree is the last statement in the IfModule container ("RewriteRule blah
blah").

The problem is that when ap_build_config_sub() handles this type of
construct, it moves *current to the end of the list before returning.
If this construct were the first thing in the file, the caller would
set conftree to *current, not realizing that there were list elements
before *current.  The caller doesn't have addressability to those list
elements.

With this change, ap_build_config_sub() sets *conftree before
walking *current to the end of the list.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85993 13f79535-47bb-0310-9956-ffa450edef68
2000-08-04 23:22:57 +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
William A. Rowe Jr
847b20108c Add APR_EOL_STR for a platform specific text delimiter, provided by
apr.h (defined in apr.h.in and apr.hw).  This is needed -only- in APR
  created files (true raw files) such as logs.  It is not required in any
  splat to screen (stderr/stdout) formatting, nor any html markup.

  Some other modules slipped through in the prior apr_strings.h commit.
  Sorry 'bout that.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85878 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 01:06:32 +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
Doug MacEachern
2f0cdb36b0 parms needs err_directive incase execute_now() returns non-NULL (e.g. if LoadModule fails)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85692 13f79535-47bb-0310-9956-ffa450edef68
2000-06-25 22:50:10 +00:00
Jeff Trawick
de5c9c1eda OS/390 needs arpa/inet.h for htonl().
Submitted by:	Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85681 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 02:01:28 +00:00
Jeff Trawick
c58c39beeb Use the new command-handler initializer macros in mod_auth;
clean up the resulting warnings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85609 13f79535-47bb-0310-9956-ffa450edef68
2000-06-18 13:33:29 +00:00
Ben Laurie
8da89daa47 More command handlers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85604 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 21:37:05 +00:00
Ben Laurie
c0a4cb7873 More consification, correct command initialisation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85599 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 16:29:53 +00:00
Ben Laurie
c1b39458ab Command handler revamp. Note that this makes the code produce a LOT of
warnings!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85595 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 11:13:05 +00:00
Jeff Trawick
78571030f9 Fix segfault when reporting this type of syntax error:
"</container> without matching <container> section", where
container is VirtualHost or Directory or whatever.

This was a path not covered by the fix in 2.0a4 to report
the proper line numbers (sorry!).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85585 13f79535-47bb-0310-9956-ffa450edef68
2000-06-16 12:00:58 +00:00
Jeff Trawick
a8591e550e Fix a couple of problems with the pre/post config processing changes:
1) symptom: on system with bad/no DNS setup, ServerName isn't
   processed so init fails

cause:

  ap_fini_vhost_config() called before ap_process_config_tree(), so
  ServerName was never stored in the config structure

2) symptom: on system with virtual hosts configured, SIGSEGV in
   open_multi_logs()

cause:

   the module configs for the virtual hosts haven't been merged in
   yet, and open_multi_logs() gets NULL for the mod_log_config
   configuration

This stuff needs to be cleaned up further, exploring the use of a
post-config hook for fixup_virtual_hosts(), ap_fini_vhost_config(),
and ap_sort_hooks(), getting a lot of logic out of main(), and
processing the config tree only once.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85522 13f79535-47bb-0310-9956-ffa450edef68
2000-06-11 22:06:57 +00:00
William A. Rowe Jr
b7d113d2b8 PR:
Obtained from:
Submitted by:
Reviewed by:

  Migrate the 'real' pre_config hook update from winnt.c to mpm_winnt.c
  and correct newly required symbols for http_main.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85436 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 01:20:04 +00:00
Tony Finch
bcbcf75254 Remove some #ifdef'ed code that doesn't make much sense
(what does the 2 signify?)

Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85433 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 23:58:34 +00:00
Ryan Bloom
71d8e39db6 Modify the config order so that we read the config, process all EXEC_ON_READ
directives at the same time, run pre_config hook for all modules, and
then walk the tree.  This allows all modules to have a pre_config hook and
know that it will be called at a reasonable time.  I also made "Include"
an EXEC_ON_READ directive so that it is included in the tree properly.
This was required after the other changes that were made.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85393 13f79535-47bb-0310-9956-ffa450edef68
2000-06-03 16:27:03 +00:00
Ryan Bloom
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
Ryan Bloom
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
Jeff Trawick
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
William A. Rowe Jr
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
William A. Rowe Jr
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
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
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
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
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
Ryan Bloom
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
Ryan Bloom
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
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
Allan K. Edwards
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
Doug MacEachern
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
Greg Stein
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
Greg Stein
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
Greg Stein
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
Ryan Bloom
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
Brian Havard
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
Ryan Bloom
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
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
dgaudet
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