1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

383 Commits

Author SHA1 Message Date
William A. Rowe Jr
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
Bill Stoddard
fc97838100 Fix compiler warning on AIX
Submitted by:  Victor Orlikowski
Reviewed by:   Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85712 13f79535-47bb-0310-9956-ffa450edef68
2000-06-27 22:37:36 +00:00
Greg Stein
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
William A. Rowe Jr
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
William A. Rowe Jr
a8dfe79493 This patch disallows bogus args to the ScriptInterpreterSource directive
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85624 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 03:53:55 +00:00
William A. Rowe Jr
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
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
24878f1675 Fix warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85597 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 12:33:30 +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
e38702601d Include the proper header file (under X/Open, at least) for ntohs() in
a couple of modules.  This lets us link-edit successfully again on OS/390.
(OS/390 only has the macro form of these functions.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85580 13f79535-47bb-0310-9956-ffa450edef68
2000-06-15 13:42:01 +00:00
Jeff Trawick
a9746375cf Get the ap_config.h cleanup working on FreeBSD by adding includes of
additional system headers.

A platform check in logresolve.c to determine whether or not we include
<arpa/inet.h> was converted to a feature check.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85567 13f79535-47bb-0310-9956-ffa450edef68
2000-06-13 21:36:18 +00:00
Ryan Bloom
750d8cc03c Protect system header files with the appropriate macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 23:03:05 +00:00
Ryan Bloom
580852da85 Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:47:17 +00:00
Ryan Bloom
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
William A. Rowe Jr
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
Jeff Trawick
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
Ryan Bloom
150c8bcd64 Fix a warning and a bug from the server_token commit.
Submitted by:	Eric Cholet <cholet@logilune.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85431 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 22:57:20 +00:00
Ryan Bloom
eda6e3d23c Add server tokens back to 2.0. Also bring forward the change to allow
the PRODUCT_ONLY value for ServerTokens.  This is relatively clean,
all of the code lives in http_core, and when a module wants to add a token,
they just call ap_add_version_component from the post_config hook.  Actually
ap_add_version_component can be done anytime after the config has been
parsed, it just makes the most sense to do it in post_config IMHO.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85426 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 19:44:02 +00:00
Jeff Trawick
43c2b45f38 EBCDIC: Rearrange calls to ap_checkconv() so that most handlers
won't need to call it.
Submitted by:	Greg Ames, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85397 13f79535-47bb-0310-9956-ffa450edef68
2000-06-03 22:41:01 +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
Jeff Trawick
5d2faa8caa fix missed change to comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85376 13f79535-47bb-0310-9956-ffa450edef68
2000-06-02 13:38:04 +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
Jeff Trawick
78aba7227f APACHE_XLATE, CHARSET_EBCDIC stuff:
Provide new function ap_set_content_xlate() to simplify what needs
to be done to set up translation of content.  Use it where appropriate.

With this change, EBCDIC logic was tweaked so that ap_checkconv() does
not overlay a translation handle previously stored (e.g., by a module)
unless it is turning translation off.  Unless ap_checkconv() determines
that translation is inappropriate, it should leave the translation handle
alone.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85296 13f79535-47bb-0310-9956-ffa450edef68
2000-05-25 20:51:25 +00:00
Jeff Trawick
4636c1e3c1 Fix some bugs in the use of APACHE_XLATE vs. CHARSET_EBCDIC
which prevented building with APACHE_XLATE on an ASCII machine.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85247 13f79535-47bb-0310-9956-ffa450edef68
2000-05-18 19:54:44 +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
Jeff Trawick
7387a849be util_ebcdic.h, util_ebcdic.c, http_core.c:
tweak ap_checkconv() for 2.0
buff.c:
  fix typo in comment
util_md5.h:
  change CHARSET_EBCDIC to APACHE_XLATE
util_script.c:
  APR-ize some character set conversion (EBCDIC only)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85214 13f79535-47bb-0310-9956-ffa450edef68
2000-05-15 17:51:23 +00:00
Jeff Trawick
5e0e87ef86 EBCDIC: Update util_md5.c routines to use APR-ized ap_MD5*()
routines.  As in 1.3, ap_md5digest() has a different function
signature when CHARSET_EBCDIC is defined :(


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85182 13f79535-47bb-0310-9956-ffa450edef68
2000-05-11 02:32:05 +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
Jeff Trawick
429098f3b4 Port a 1.3 EBCDIC fix to 2.0:
This is a port of my 1.3 patch which allows error response strings to be
translated from ebcdic to ascii.  This bug is triggered by trying to
access a non-existant .gif for example.  The content type starts out
being image/gif but is switched by error processing to text/html.
Without this patch, ap_checkconv() is called too early (before the error
processing), so the ebcdic conversion flag gets turned off and the
eventual "404 Not Found" error response is sent to the browser still in
ebcdic.  Not very pretty.

Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85040 13f79535-47bb-0310-9956-ffa450edef68
2000-04-25 23:19:15 +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
Roy T. Fielding
7cbb1cb050 Finished move of ap_md5 routines to apr_md5. Removed ap_md5.h.
Replaced more magic numbers with MD5_DIGESTSIZE.  Yuck.

Submitted by:	William Rowe, Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85017 13f79535-47bb-0310-9956-ffa450edef68
2000-04-23 02:32:58 +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
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
Jeff Trawick
a212f927b0 get rid of an unused variable from virtualhost_section()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84917 13f79535-47bb-0310-9956-ffa450edef68
2000-04-05 02:22:20 +00:00
Roy T. Fielding
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
Jeff Trawick
81a15da717 when logging a failure of ap_mmap_create(), pass the returned
status to ap_log_rerror() instead of the current errno value


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84847 13f79535-47bb-0310-9956-ffa450edef68
2000-03-29 02:52:31 +00:00
Ryan Bloom
63f93a6504 Backout layered I/O changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84842 13f79535-47bb-0310-9956-ffa450edef68
2000-03-27 16:22:30 +00:00
Ryan Bloom
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
Jeff Trawick
b222ae5825 get rid of unused local variable w in set_error_document()
Submitted by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84821 13f79535-47bb-0310-9956-ffa450edef68
2000-03-22 09:46:38 +00:00
Tony Finch
898f959cea Some TODOCs have been DOCced.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84816 13f79535-47bb-0310-9956-ffa450edef68
2000-03-21 19:10:09 +00:00
Tony Finch
ac23f18cd5 Explain the changed ErrorDocument syntax.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84813 13f79535-47bb-0310-9956-ffa450edef68
2000-03-21 18:28:27 +00:00
Manoj Kasichainula
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
dgaudet
7956b7ecec go dirk go, RAW_ARGS is evil. added a TODOC.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84767 13f79535-47bb-0310-9956-ffa450edef68
2000-03-14 19:29:40 +00:00
Dirk-Willem van Gulik
b779325522 Nasty backwards compatibility breaking 'fix' to get rid of
ErrorDocument	201 "Some string without a closing quote

case which is just pure ugly. I am _NOT_ going to be offended
if anyone rolls back this patch OR if anyone suggests to have
an ErrorDocument2 which the proper syntax/semantics.

But I thought lets take my chance whilst everyone is still
recovering from the apachecon.

Dw.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84764 13f79535-47bb-0310-9956-ffa450edef68
2000-03-14 13:32:08 +00:00
Jim Jagielski
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
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
Ryan Bloom
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