1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

96 Commits

Author SHA1 Message Date
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
d0e05bada9 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102565 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:07:22 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
André Malo
be807cff9a add a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101678 13f79535-47bb-0310-9956-ffa450edef68
2003-11-02 12:21:33 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
André Malo
c05c7d9c80 provide better error messages for the multiviewsmatch directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98145 13f79535-47bb-0310-9956-ffa450edef68
2003-01-01 04:25:02 +00:00
Brian Pane
33fa28e38a don't segfault in mod_mime's find_ct() if we get there without having set r->filename
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97924 13f79535-47bb-0310-9956-ffa450edef68
2002-12-15 16:37:19 +00:00
Jeff Trawick
c0136a291a don't lose const when calling strrchr()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96646 13f79535-47bb-0310-9956-ffa450edef68
2002-09-05 11:04:25 +00:00
Justin Erenkrantz
166a901497 Add ModMimeUsePathInfo directive.
This directive allows mod_mime to lookup extension information for content
served via Location blocks so that content-type, filters, etc can be
applied to non-file content.

(I wouldn't be shocked if we end up changing the directive name.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96644 13f79535-47bb-0310-9956-ffa450edef68
2002-09-05 07:31:14 +00:00
Cliff Woolley
81c03e82c4 Renames:
APR_XtOffset   -> APR_OFFSET
  APR_XtOffsetOf -> APR_OFFSETOF


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95164 13f79535-47bb-0310-9956-ffa450edef68
2002-05-18 04:13:13 +00:00
Aaron Bannert
e3eca4ace6 Just another huge style diff. Space-indentation is comming back in
a big way. No more misaligned if's without {} blocks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95162 13f79535-47bb-0310-9956-ffa450edef68
2002-05-18 00:45:05 +00:00
Brian Pane
32c16646d1 Remove an extraneous loop condition
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95045 13f79535-47bb-0310-9956-ffa450edef68
2002-05-12 03:59:31 +00:00
Brian Pane
8d637c1f13 Performance fixes:
* eliminate some copying of sub-parts of the content type in analyze_ct()
* take advantage of the fact that we know the lengths of those sub-parts
  in find_ct() to avoid having to recompute their length for concatenation

The charset handling code needs the same type of optimization eventually.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94900 13f79535-47bb-0310-9956-ffa450edef68
2002-05-02 03:19:44 +00:00
Justin Erenkrantz
8e1a89e148 We must always use case-insensitive comparisons in mod_mime even if
our platform is not "case-blind."  This matches 1.3 behavior and our
docs say that the extension argument is case-insensitive anyway.

This is case where the code fix is easier than the doc fix.  =)

PR: 8223


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94789 13f79535-47bb-0310-9956-ffa450edef68
2002-04-25 05:40:15 +00:00
Bill Stoddard
d5c24720dc Commit 1 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments on the call to aligh with ap_set_content_length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94056 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:41:55 +00:00
Bill Stoddard
470edb9dd8 First commit to introduce accessor function to set r->content_type..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94027 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 01:58:47 +00:00
Jeff Trawick
0bd9790c41 fix the type of a string argument to ap_log_error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93973 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 20:29:38 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Brian Pane
3e75e8b52e [indentation fixes only]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92389 13f79535-47bb-0310-9956-ffa450edef68
2001-12-08 02:04:51 +00:00
Brian Pane
dc85b1450c Reduced the number of times that we scan through each string
looking for invalid characters in analyze_ct()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92388 13f79535-47bb-0310-9956-ffa450edef68
2001-12-08 02:00:42 +00:00
Jeff Trawick
226d166f3e fix a const-ness problem caused by calling the wrong strchr()
--enable-maintainer-mode and a decent compiler is *so* important!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92365 13f79535-47bb-0310-9956-ffa450edef68
2001-12-07 12:29:04 +00:00
Brian Pane
47a51848bc Removed one more strdup in the content-type processing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92364 13f79535-47bb-0310-9956-ffa450edef68
2001-12-07 08:48:17 +00:00
Brian Pane
ad405f14c2 Optimized away some string scans and copies in analyze_ct()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92363 13f79535-47bb-0310-9956-ffa450edef68
2001-12-07 08:19:44 +00:00
Brian Pane
a262e40728 optimization: replaced an apr_pstrndup call with apr_pstrmemdup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92359 13f79535-47bb-0310-9956-ffa450edef68
2001-12-07 03:44:29 +00:00
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
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