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

119 Commits

Author SHA1 Message Date
Ian Holsman
ab5d92e1bf use the new 'apr_hash_merge' function to do the overlays.
In our testing this resulting in a large performance win (>5%)

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91825 13f79535-47bb-0310-9956-ffa450edef68
2001-11-09 23:15:43 +00:00
William A. Rowe Jr
71c53ab7da Forgot the directive's note change for "Any"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91466 13f79535-47bb-0310-9956-ffa450edef68
2001-10-15 02:39:37 +00:00
William A. Rowe Jr
0f93ac6408 Close the mod_mime file extension matching issue by (as Ken Coar suggests)
allowing users to continue to rely on the old 1.3 behavior of matching Any
  extensions, the strict behavior of matching NegotiatedOnly arguments, or
  including Handlers and Filters with the MultiviewsMatch directive for
  mod_negotiation control.  Unfortunately, the component matching occurs
  in mod_mime, so that's where this option must reside.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91419 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 13:27:05 +00:00
William A. Rowe Jr
91cd7755cd Negotiation once allowed any file, of any filename extension, to be
served.  The original patch to mod_negotation eliminated all extensions
  that did not reflect filename extensions associated with negotiation
  variables, unless the user expressly specified the file name with those
  filename extensions.

  This patch [attributed to me] was vetoed at its inception, it was provided
  as an alternative for those who had to have the current behavior.

  There is now another alternative patch that would introduce the
  MultiviewsMatch directive to mod_mime, for consideration and discussion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91405 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 19:43:37 +00:00
Greg Ames
29c24582cf allow file extentions specified by AddHandler, AddInputFilter, and
AddOutputFilter to be ignored when matching the URI.

Submitted by:	Bill Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91376 13f79535-47bb-0310-9956-ffa450edef68
2001-10-09 01:45:20 +00:00
William A. Rowe Jr
73fcb0b7af Goodbye r->content_lanaguage (per vote from apache-1.3/STATUS).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91244 13f79535-47bb-0310-9956-ffa450edef68
2001-10-02 21:13:42 +00:00
William A. Rowe Jr
7f0b609358 The per_dir_merge overlay of AddInputFilter/AddOutputFilter must
absolutely replace a prior definition for the same file extension.
  Picture AddOutputFilter Includes .html in a directory, and needing
  to replace that behavior in a subdirectory which does not contain
  SSI html files.  This behavior must remain consistent to the other
  mime behaviors, as documented in manual/mod/mod_mime.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90959 13f79535-47bb-0310-9956-ffa450edef68
2001-09-08 05:50:12 +00:00
Justin Erenkrantz
06dc8eff0e We should be copying the filters as well when we perform the extension merge
(which seems to use a ; syntax).

Try:
AddOutputFilter GZ html  (server-level)
AddOutputFilter Includes html  (directory-level)

Oops.

Without this, when you use mod_gz and go to /foobarnotthere/, the error
page isn't handled by mod_include.  Oooops.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90871 13f79535-47bb-0310-9956-ffa450edef68
2001-09-02 08:34:45 +00:00
William A. Rowe Jr
3044c08741 Fix mod_mime skipping over mime.types when some _other_ field was set
with mod_mime, but not AddType.

  Why is everybody always breaking my local CHANGES file ;-?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90796 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 04:11:57 +00:00
William A. Rowe Jr
e18cb04fd3 Also in the prior commit (1.338)
*) Modfied mod_mime to prevent mod_negotation from serving a multiview
     of a 'handler' or 'filter', so that any filename extension that does
     not contribute to the negotiated metadata can't be served without
     an explicit request.  E.g., if the .Z extension is associated with
     an unzip filter, the user request somefile.Z.html, mod_negotiation
     won't serve it.  It can serve somefile.Z.html when somefile.Z is
     requested, since the .Z extension is explictly requested, if the
     .html extension is associated with ContentType text/html.

    See changes for a complete description.  Because (in the example) the
    .Z extension doesn't affect negotiated behavior, the files index.html
    and index.Z.html couldn't be distinguished, and the user would get an
    error 406 NOT ACCEPTABLE, which is the _wrong_ answer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90759 13f79535-47bb-0310-9956-ffa450edef68
2001-08-28 15:31:08 +00:00
William A. Rowe Jr
0ba34fee71 Introduces mod_mime AddInputFilter and AddOutputFilter filter ext syntax.
Significantly refactored the code to maintain single functions for the
  add_extension_info hash and remove_extension_info table processing.

  The AddInputFilter/AddOutputFilter could have been plural, as they accept
  a semicolon delimited list of filters (e.g. you need to stack two different
  filters based on a single extension.)  I expect that the plural could
  confuse users, though, as they might expect AddInputFilters foo bar var
  to add foo and bar to the extension var, which it definately doesn't do!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90756 13f79535-47bb-0310-9956-ffa450edef68
2001-08-28 15:07:11 +00:00
Doug MacEachern
3ae56fb280 reverting to sterlings original segv fix when extension_mappings is NULL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90512 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 22:03:01 +00:00
Doug MacEachern
8a61898a77 v2 of sterlings segv fix
always initialize the extension_info hash rather than checking that it is
!= NULL
PR:
Obtained from:
Submitted by:	John Sterling <sterling@covalent.net>
Reviewed by: dougm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90510 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 20:43:30 +00:00
Doug MacEachern
4fbdccc7aa fix segv in mod_mime if no AddTypes are configured
PR:
Obtained from:
Submitted by:	John Sterling <sterling@covalent.net>
Reviewed by:	dougm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90506 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 20:03:47 +00:00
Ryan Bloom
6fdd45dc48 Update the Apache code to account for the XtOffset change in APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90356 13f79535-47bb-0310-9956-ffa450edef68
2001-08-19 05:48:19 +00:00
William A. Rowe Jr
1c0c1a70a2 The two more Remove flavors needed testing, as well. While I'm at it,
add a reasonable explanation of why we are about to copy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90245 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 21:23:29 +00:00
William A. Rowe Jr
80d01c5861 Push back CHANGES to document the complete mod_mime segfault solution.
Rounded out the mod_mime Add/Remove pairs by adding RemoveLanguage
  and RemoveCharset directives, and rolled in the remove_items handling.
  This is (effectively) my complete patch, sans pool optimizations.
  [William Rowe]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90239 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 20:04:32 +00:00
William A. Rowe Jr
4a48ea1586 Build on Greg's fix for the hash copy, and always copy the exinfo elements
as well.  This should sufficiently demonstrate in benchmarking why we either
  must optimize, or revert to tables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90237 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 18:36:17 +00:00
William A. Rowe Jr
5e3e42e250 Solve the segfault until the right patch is unearthed.
[Greg Ames]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90166 13f79535-47bb-0310-9956-ffa450edef68
2001-08-15 03:09:32 +00:00
Roy T. Fielding
184c965da5 Clean up several parsing errors in find_ct that may or may not be causing
a seg fault.  In any case, it was butt ugly code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90150 13f79535-47bb-0310-9956-ffa450edef68
2001-08-14 02:35:55 +00:00
William A. Rowe Jr
f96ecb7c51 Subtle variation for security. If the mod_mime file has nothing specific
to say about a given set of file extentions (and has only based the
  resolved fields on the default language, encoding and content type)
  then tell us we can ignore the result by leaving the exception list
  entirely undefined.  If mod_mime adds anything (a language, charset, or
  whatnot) then proceed to use the file in the Multiviews evaluation,
  otherwise mod_negotation will ignore the file found.

  This points out a need for a slightly twisted DefaultClientLanguage,
  as opposed to creating foo.html.html files.  Either that, or introduce
  a 'neutral' entity that the user can list (say, .default) for mod_mime
  to declare it as a fallback language/encoding/content-type/handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89919 13f79535-47bb-0310-9956-ffa450edef68
2001-08-04 04:32:59 +00:00
Jeff Trawick
b42eaaf94d axe unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89917 13f79535-47bb-0310-9956-ffa450edef68
2001-08-04 01:29:38 +00:00
William A. Rowe Jr
d640fd47fe Solve the major underlying problem of content negotation by passing
mod_negotiation the 'unresolved' parts of the path in a ->notes
  array ap-mime-exceptions-list.

  If mod_mime is given index.html.bad.en it will add index and bad
  to the list (presuming html and en are both defined.)

  mod_negotiation will decide if index and bad are it's fault (the
  user requested index.html.bad[.*]) or if it's a messed up file
  (say .old, .junk, or .bak).

  The next patch to allow any-order negotiation should check each
  of these list elements, so that asking for index.bad in the prior
  example would succeed.  Right now that request would fail because
  .html was recognized, so it's not in the exceptions list.  This
  patch uses a simple strcmp to the given name.

  Also, this patch allows any mod_mime processed file to be served,
  even if the content type cannot be determined (think README.en).
  This is crippled by the client expect headers and omitting the
  default content type.

  PLEASE vet this code carefully.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89912 13f79535-47bb-0310-9956-ffa450edef68
2001-08-03 22:57:47 +00:00
William A. Rowe Jr
e43b4bde19 Really compress the add_/remove_ handling, and fix pool allocations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89878 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 17:25:05 +00:00
William A. Rowe Jr
c0dbe65816 Need some context for the iterator! Finally get to use that accessor :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89866 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 00:17:45 +00:00
William A. Rowe Jr
a99bc9cbb5 Solve the merge bugs, by storing a copy bit to save us a ton of
reallocation in the merge config phase.  Should keep most of the
  savings realized by moving to tables.

  Need others to vet this code, please!  Look at this and the prior
  patch as a single diff (-r n -r n-2) to see the overall changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89865 13f79535-47bb-0310-9956-ffa450edef68
2001-08-01 23:33:08 +00:00
Bill Stoddard
13793b8a50 Performance improvement to mod_mime.c. find_ct() in mod_mime,
spends a lot of time in apr_table_get calls.  Using the default
httpd.conf, the tables for languages and charsets are somewhat
large, so the time spent scanning them on each request is
significant. Replacing the tables with hash tables provides
a nice speedup. [Brian Pane <bpane@pacbell.net>]

Had to handmerge a lot of this patch so please review! Dean had some suggestions
for improvement which are not currently implemented.

Submitted by:	Brian Pane
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89535 13f79535-47bb-0310-9956-ffa450edef68
2001-07-11 04:47:02 +00:00
William A. Rowe Jr
546f8d040c Allow index.html.en and Index.html.FR to both be considered in negotation
on case insensitive platforms, only.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89381 13f79535-47bb-0310-9956-ffa450edef68
2001-06-18 05:36:33 +00:00
Chuck Murcko
93463cfc17 This is a fix that went into v1.3 quite a while back, but not into v2.0.
It sorts out the problem when a password protected reverse proxy URL
sends a Proxy-Authenticate to a browser instead of a WWW-Authenticate.

This patch covers the changes to the httpd-2.0 tree.

Submitted by:	Graham Leggett
Reviewed by:	Chuck Murcko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88527 13f79535-47bb-0310-9956-ffa450edef68
2001-03-16 07:28:08 +00:00
William A. Rowe Jr
5cccb4a478 Clean up namespace badness with s/configfile_t/ap_configfile_t/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88312 13f79535-47bb-0310-9956-ffa450edef68
2001-02-25 00:51:32 +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
Greg Stein
32dcfd70c4 sneaky for loop... make it more obvious what it is doing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88105 13f79535-47bb-0310-9956-ffa450edef68
2001-02-12 03:02:05 +00:00
Greg Stein
5dc34feb12 *) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88061 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 14:04:21 +00:00
Ryan Bloom
6fc8754f2b Remove the SetFilter directive from the code. This directive wasn't
nearly as useful as the SetOutputFilter and SetInputFilter, and it never
really worked properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88053 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 05:30:51 +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
William A. Rowe Jr
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
William A. Rowe Jr
40655f8641 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00
Ben Laurie
45f620672d Make handlers use hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87604 13f79535-47bb-0310-9956-ffa450edef68
2001-01-07 19:55:59 +00:00
Ryan Bloom
31602dc2c0 Get SetFilter working with MIME-types again and update the docs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87035 13f79535-47bb-0310-9956-ffa450edef68
2000-11-20 18:29:55 +00:00
Ryan Bloom
1206c2c37d Update the SetFilter directive to work with Handlers instead of MIME-types.
This also updates the docs to reflect the change.
Submitted by:	Joshua Slive
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87028 13f79535-47bb-0310-9956-ffa450edef68
2000-11-19 18:52:21 +00:00
Ryan Bloom
a17358b280 Add a directive to mod_mime which allows people to configure a filter
stack for a given mime-type.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87026 13f79535-47bb-0310-9956-ffa450edef68
2000-11-19 16:55:11 +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
Ryan Bloom
e016730659 Port the fix for Remove Handler from 1.3 to 2.0
Submitted by:	Sander van Zoest <sander@covalent.net>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86467 13f79535-47bb-0310-9956-ffa450edef68
2000-10-09 03:05:38 +00:00
Jeff Trawick
cc301503a1 Fix some problems with the recent port of RemoveEncoding and
RemoveType to 2.0.  (--with-maintainer-mode works wonders!)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86248 13f79535-47bb-0310-9956-ffa450edef68
2000-09-18 12:17:29 +00:00
Ryan Bloom
dc62a5eb8d Port the RemoveEncodings/RemoveTypes code from 1.3 to 2.0. This includes
the bug fix that was recently committed to the 2.0 tree.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86240 13f79535-47bb-0310-9956-ffa450edef68
2000-09-17 01:12:46 +00:00
William A. Rowe Jr
1a9db204f5 Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +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
Ryan Bloom
28f6bfe4a2 Remove all of the ap_is* functions from Apache. They were already in APR,
and we all hate duplicate code.  :-)  This also required adding ap_isascii
to APR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85897 13f79535-47bb-0310-9956-ffa450edef68
2000-07-26 15:31:30 +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
Bill Stoddard
2e40320b53 Get rid of more compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85618 13f79535-47bb-0310-9956-ffa450edef68
2000-06-19 18:11:47 +00:00