199 Commits

Author SHA1 Message Date
7552c9cb16 Eliminate proxy: (and all other 'special') processing from the
ap_directory_walk() phase.  Modules that want to use special
  walk logic should refer to the mod_proxy map_to_location example,
  with it's proxy_walk and proxysection implementation.  This makes
  either directory_walk flavor much more legible, since that phase
  only runs against real <Directory > blocks.

  On a technical note, this patch also forces the Directory to be
  canonical (unless it is "/" or a regex.)  It also allows us to
  be more explicit when declaring <Directory > block errors.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90684 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 05:10:17 +00:00
bb757df043 sec, sec, who's got a sec? This gave me a headache, but I had to clear
out the last patch before I rearranged this to be _readable_.

  Next step for everyone's sanity, provide <Proxy > directives ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90646 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 18:12:02 +00:00
85e8fbd0e2 Add the ability to extend the methods that Apache understands
and have those methods <limit>able in the httpd.conf. It uses
the same bit mask/shifted offset as the original HTTP methods
such as M_GET or M_POST, but expands the total bits from an int to
an ap_int64_t to handle more bits for new request methods than
an int provides.
Submitted by:	Cody Sherr <csherr@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89869 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 04:25:20 +00:00
0eee59792b Provide the same optimization to the dir_config structure to track
d_is_absolute, along with d_is_fnmatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89791 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 18:51:57 +00:00
c86f120560 Doc formatting fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89749 13f79535-47bb-0310-9956-ffa450edef68
2001-07-27 21:01:16 +00:00
e5640cedcc Define a hook for fetching management/status items.
This patch was submitted by Ian Holsman. Greg revised some names, applied
the Apache style, and namespace-prefixed the public symbols. Minor bugfix in
the use of the hook implementation macro.

Submitted by: Ian Holsman <IanH@cnet.com>
Reviewed by: Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89364 13f79535-47bb-0310-9956-ffa450edef68
2001-06-13 20:11:45 +00:00
7ef7064507 Change AP_MIN_BYTES_TO_WRITE from 9000 to 8192 to match the bucket buffer
size.  This fixes the 8192-808-8192-808 iovec-length sequence problem
on platforms using writev() (eg OS/2).

Reviewed by:	Brian Havard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88843 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 05:19:25 +00:00
d3dcba691d tweak ap_get_remote_host() so that the caller can find out if she got
back an IP address

mod_access needed to know this, but the old code didn't handle IPv6


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88484 13f79535-47bb-0310-9956-ffa450edef68
2001-03-09 20:30:34 +00:00
ffdad830aa just making server_signature enum decl easier to read (for both humans and C::Scan)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88274 13f79535-47bb-0310-9956-ffa450edef68
2001-02-22 08:42:09 +00:00
b66380e941 shift some declarations over to mod_core.h where they're totally private.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88226 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 03:18:35 +00:00
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
bcb1a9309e fix minor prototype inconsistencies noticed with C::Scan
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87970 13f79535-47bb-0310-9956-ffa450edef68
2001-02-04 03:00:15 +00:00
9c95b5ae98 get Apache building again after the change to make_exports.awk
yeah, I know, this shouldn't be necessary.  you're preaching to the choir.
but this does the job until make_exports.awk gets slightly more robust.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87929 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 18:56:35 +00:00
9bb056e62d Normalize the use of AP_DECLARE_DATA
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87733 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 13:22:49 +00:00
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
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
a90554d578 Next pass at the content-length filter. Not perfect quite yet, but
getting closer
Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87058 13f79535-47bb-0310-9956-ffa450edef68
2000-11-22 00:40:20 +00:00
798d259441 Modify the content-length filter to change the criteria used to determine
if/when we compute the content-length.  There are just a few cases now:

        1) We already have all the data
        2) We don't have all the data and:
                2a)  This is a 1.1 request but we can't chunk
                2b)  The is a keep-alive request
	    In the future, we probably want to modify this to not
	    be a keep-alive request.

This filter always buffers 9K of data.  The reason is simple, the core will
buffer 9K at a time anyway, and there is a chance that we may get the end
of the request before we hit 9K.  This increases our chances of being able
to send a c-l.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87055 13f79535-47bb-0310-9956-ffa450edef68
2000-11-21 20:17:20 +00:00
2318bf5ab4 Missed these first time round... More apr_port_t changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86867 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 11:42:21 +00:00
7eecd8064e ap_get_client_block() now uses a brigade in core_request_config
instead of a brigade in core_dir_conf.  For now, getline() and
ap_get_client_block() share a brigade.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86647 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 17:42:44 +00:00
2311f5561e Add a core_request_config so we have a safe semi-hidden place to save core data
that lives across function calls during a single request.  Change getline() to
take a request_rec parm (rather than a conn_rec) so we can access the
core_request_config.

This is in preparation for adding look-ahead functionality to getline(), so it
can support header line folding once again.  I'm committing these changes first
so the core_request_config can be used elsewhere (i.e. ap_get_client_block).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86642 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 15:21:32 +00:00
ce0a65bfd6 Rename output filters field ("filters") in core_dir_config to
"output_filters" for consistency with the name of the input
filters field ("input_filters").


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86623 13f79535-47bb-0310-9956-ffa450edef68
2000-10-17 01:35:12 +00:00
eb7793f871 input filtering changes:
get dechunking working
  verify that infrastructure for input filters works
    (use existing AddInputFilter directive)

Unlike with my previous patch, ap_get_client_block() saves state between
calls in the core's per-request dir config.

Unlike with my previous patch, HTTP_IN keeps a count of remaining bytes
in the conn_rec.  Code that needs to prod it to deliver a certain amount
of request body plays with conn_rec->remain directly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86613 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 19:11:53 +00:00
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
b7d765272e Add a bit of infrastructure which will be needed for input filtering:
1) separate filter lists hanging off the r and the c

   requests start off with the same filter list as the connection

   the input filter list is not initialized for subrequests

   internal redirects start off with the same filter list as the
   connection

2) AddInputFilter directive (blatant rip-off of Ryan's AddOutputFilter
   directive); as with AddOutputFilter, the network is implicitly to the
   right of the specified filter list; this may not be the most
   intuitive way to specify the filters; not sure yet


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86403 13f79535-47bb-0310-9956-ffa450edef68
2000-10-05 16:55:10 +00:00
9c295f8e68 Add the AddFilter directive. This directive takes a list of filter names
that have been previously registered with the server.  Currently the
directive is only valid inside the config file, but once the Options
directive is tweaked a bit, I would feel more comfortable exposing this
directive to htaccess files.

As a part of making adding this filter, I removed the ctx pointer from the
ap_add_filter prototype.  The problem is that the core is the thing that
is actually inserting the filter into the filter stack, but the core doesn't
know how to allocate memory for each filter.  The solution is to have the
filters themselves be responsible for allocating the ctx memory whenever
it is required.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86220 13f79535-47bb-0310-9956-ffa450edef68
2000-09-13 23:13:20 +00:00
26074e495b Document http_core's public APIs for use with ScanDoc.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85997 13f79535-47bb-0310-9956-ffa450edef68
2000-08-05 16:50:39 +00:00
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
71aeeddbe2 shift the LimitXMLRequestBody directive to the core. use it from util_xml.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85816 13f79535-47bb-0310-9956-ffa450edef68
2000-07-11 00:06:22 +00:00
8d92b2f40a Whoops... will be needing this exported rsn for mod_mmap_static. But the
argument to register hook fn takes a __cdecl function, so _NONSTD it is.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85716 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 07:55:44 +00:00
b9ce8c3ebc Hook functions aren't translated (and when they are, they are _NONSTD)...
but you don't need to export a function you will pass by ref to a
  register hook function.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85715 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 04:52:39 +00:00
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
ad6759a657 This Win32 patch adds the key HKCR/filetype/shell/execcgi/command as the
preference over the HKCR/filetype/shell/open/command for registry-based
  script execution, allowing two behaviors to coexist peacefully (the pipe
  based console behavior and the Win32 shell behavior.)

  The new ScriptInterpreterSource registry-strict directive dismisses bth
  the HKCR/filetype/shell/open/command and the shebang processing for
  administrators who are interested in explicit authorization of file type
  execution allowed in the context of subscriber-created scripts.  The net
  result: only HKCR/filetype/shell/execcgi/command processing is permitted.

  Docs to follow shortly.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85625 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 04:15:02 +00:00
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
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
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
1ad75f891b PR:
Obtained from:
Submitted by:
Reviewed by:

  Hmmm... exporting a hook, very interesting :-)

  But the win32 build believes hooks are pretty uninteresting, mostly
  static __cdecl calls, so pound this declaration into NONSTD.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85439 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 04:11:08 +00:00
c84d2199e5 Port mod_mmap_static to 2.0. Make it go faster.
core: Export core_translate() as ap_core_translate() for use by
      mod_mmap_static.
Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85437 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 01:49:30 +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
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
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
2a98ce1a7a Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84877 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 07:19:05 +00:00
70ef1e69d5 Backport the CSS security fixes to Apache 2.0a. Or is that forward
port? My sense of direction is all confused.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84751 13f79535-47bb-0310-9956-ffa450edef68
2000-03-13 20:27:29 +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
b97e24e81e Add back the script_interpreter_source code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84505 13f79535-47bb-0310-9956-ffa450edef68
2000-01-21 18:42:45 +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
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
bab4dcb050 Rearchitect the mess in http_main.c, http_core.c and buff.c.
Basic restructuring to introduce the MPM concept; includes various
changes to the module API... better described by docs/initial_blurb.txt.

Created multiple process model (MPM) concept by ripping out the process
guts from http_main.c and http_core.c and moving them to separate files
under src/modules/mpm/

Moved socket creation stuff to listen.c.
Moved connection open, maintenance and close to http_connection.c.

I/O layering and BUFF revamp.  Much of buff.c moved to ap_iol,
iol_socket, and iol_file.  See docs/buff.txt.

Moved user and auth fields from connection_rec to request_rec.
Removed RLIMIT stuff, supposedly to be implemented later in mod_cgi.
Disabled suexec, supposedly to be reimplemented later.

Submitted by:	Dean Gaudet


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83763 13f79535-47bb-0310-9956-ffa450edef68
1999-08-26 10:45:57 +00:00
ef31f58424 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@83749 13f79535-47bb-0310-9956-ffa450edef68
1999-08-24 05:50:50 +00:00