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

137 Commits

Author SHA1 Message Date
Jeff Trawick
2013bfb0f6 get rid of an unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92664 13f79535-47bb-0310-9956-ffa450edef68
2001-12-30 14:30:44 +00:00
William A. Rowe Jr
cdeaee2ced Introduce the ForceLanguagePriority options;
Prefer will circumvent a Multiple Choices by electing the first matching
  language from the LanaguagePriority list.

  Fallback will circumvent a None Acceptable by electing the first
  language found from the LanaguagePriority list.

  This breaks [expectedly] the negotiation tests.  They need review.
  My test results will be posted to dev.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92655 13f79535-47bb-0310-9956-ffa450edef68
2001-12-30 04:14:20 +00:00
Aaron Bannert
f40331c0f2 Modified for clarity.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92445 13f79535-47bb-0310-9956-ffa450edef68
2001-12-13 08:32:48 +00:00
Jeff Trawick
e4b78cbf4c rename variable "except" to avoid colliding with a macro of the
same name on Tru64


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91253 13f79535-47bb-0310-9956-ffa450edef68
2001-10-03 13:10:16 +00:00
William A. Rowe Jr
e28085508f Fix a mismatching issue, where index.html.foo.en had recognized .html and
.en components, and exceptions index and foo.  This patch will ignore the
  'missing' exception html from the request, and go on to test the exception
  foo in the list.

  This does -not- imply that a request for index.foo will succeed, in the
  example above.  The pattern match tests index.foo[.*] so we wouldn't find
  index.html.foo.anything.  The pattern matching proposed at one time by
  Francis Daly would allow index.foo to succeed as well [although many to
  many matching is dangerous, see comments in this patch.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91249 13f79535-47bb-0310-9956-ffa450edef68
2001-10-03 01:18:22 +00:00
Justin Erenkrantz
cb8569e4f8 This patch eliminates the wasteful run-time conversion of method names from
strings to numbers in places where the methods are known at compile
time.

(Justin fixed the va_end() call to be correct.)

Submitted by:	Brian Pane <bpane@pacbell.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91078 13f79535-47bb-0310-9956-ffa450edef68
2001-09-19 05:52:42 +00:00
Jeff Trawick
b9df1606d4 After committing Brian Havard's fix to Unix file_io yesterday,
we seem to be reading/seeking .var files fine on Unix even with
buffering turned on.

wrowe reports that they're working on Win32 also.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90812 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 13:37:16 +00:00
William A. Rowe Jr
bbca0b9d4b This small patch I committed last week broke the transparent negotiation
behavior.  I hope this is now settled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90754 13f79535-47bb-0310-9956-ffa450edef68
2001-08-28 03:08:31 +00:00
William A. Rowe Jr
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
Jeff Trawick
4517cf41f5 APR returns APR_EOF, not EOF...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90629 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 13:14:19 +00:00
Jeff Trawick
e01d7f45b4 temporarily back out the buffering of .var files while folks
have a chance to get APR ungetc working properly on buffered
files


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90628 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 11:35:58 +00:00
Jeff Trawick
16e61c9a59 protect const-ness of variant->file_name by using ap_strchr_c() instead
of strchr()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90627 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 10:40:04 +00:00
William A. Rowe Jr
12d567e077 Add the config of the ForceLanguagePriority directive, since we seem
to agree on what it does.  My last question is where do I force this
  behavior without tons of extra filesystem/cpu consumption?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90613 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 04:16:29 +00:00
Jeff Trawick
cc961d67bd buffer .var maps to avoid asking the kernel for one byte at a
time

note that a system trace of .var map processing still shows an
extra read() after we hit EOF the first time; we could make
use of the EOF flag in APR to avoid the read() or play with
mod_negotiation

Suggested by:	Marc Slemko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90609 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 03:04:44 +00:00
Jeff Trawick
616e82f008 please no // in Apache code... it doesn't compile everywhere
a note about why it is commented out would be appropriate too


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90581 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 20:29:47 +00:00
William A. Rowe Jr
c456b6770c This is the Body:tag\n<Content>*tag\n patch for type map files. If the
content can be served, it sends a file bucket of the type map file
  itself, forward spaced to the <Content>, set to the length of <Content>.

  <Content> may contain any binary data.  The end tag must exist, anything
  between the tag and \n is ignored.  This version (v.s. the patch sent to
  the list) includes error reporting if the end tag cannot be located.

  We need to change the etag code to accept an additional argument, so we
  can set the cache controls properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90405 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 17:37:39 +00:00
William A. Rowe Jr
56cee9cd08 A debatable change, to return (an absolute) 404 if some of the extentions
of every matching file isn't decodable by mod_mime, instead of 500.
  Adopted 404 as the result, per Roy Fielding.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89975 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 00:51:22 +00:00
William A. Rowe Jr
f541f91fcc Change the error wording, slightly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89962 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 22:44:38 +00:00
William A. Rowe Jr
ccf7dc7184 Thanks goes to Manoj, while commenting on another issue, for triggering
this idea.  If we find files matching (e.g. index.html.bak matches
  index.html) but they are rejected because we don't understand them
  (e.g. they are a directory, or .bak isn't a mod_mime recognized extension)
  then Error 500 out of here, with a note for the system administrator
  explaining that index.html matches some files, but their extensions
  cannot be grokked.  No more (unintentional, or situational) autoindex :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89961 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 22:42:59 +00:00
William A. Rowe Jr
ff7a816bf5 Remove the ->mtime reset back to negotiation, who decided to do this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89949 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 19:13:02 +00:00
William A. Rowe Jr
347b03449d Fix typo from extracting the fast-redirect code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89947 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 19:09:08 +00:00
William A. Rowe Jr
68eb2c2c83 The real slim shady finally stood up. This patch segregates the fast
internal redirect logic back into http_request, the next patch will
  actually fix it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89946 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 19:03:37 +00:00
Jeff Trawick
94bfb8fefa minimal changes to get it to compile
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89920 13f79535-47bb-0310-9956-ffa450edef68
2001-08-04 11:37:12 +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
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
ce46d6ee9e Minor quibble, <li> can and should be a balanced tag
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89754 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 01:33:10 +00:00
William A. Rowe Jr
bb2fc524c9 Final pedantic HTML 3.2/4.01 Transitional + XHTML 1.0 Transitional
compliance changes.  Note I've left alone the <P> tags, since they
  are abused, misused, potentially unsalvageable and certainly more
  effort than I care to expend in my quest for brainless end of week
  keyboard exercise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89753 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 01:29:41 +00:00
William A. Rowe Jr
5b71e358f3 Change the length of the content args to apr_off_t identifiers, and fix
mod_negotation to treat a size of -1 and indeterminate, instead of 0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89727 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 15:53:15 +00:00
William A. Rowe Jr
2d64e24da2 Deploy ap_sub_req_lookup_dirent() for the main loop. Note we _really_
need to further optimize this code, there are dozens of perhaps unnecessary
  stat calls, and meaningless #ifndef OS2 protections around apr_lstat()'s.
  OS2 has lstat (It's simply stat()) so we should pull the os-specific cruft.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89449 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 21:59:48 +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
William A. Rowe Jr
3d9c5345df Toss the float nonsense from c-l, and cast atof as a (float), which I
will argue is a totally appropriate use of a cast :-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88794 13f79535-47bb-0310-9956-ffa450edef68
2001-04-10 20:28:01 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +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
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +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
6282d6e364 Eliminate all assumptions that finfo.protection reflects the existance
or absense of a file.  finfo.filetype is defined as 0 if APR_NOFILE,
  or a non-zero value if the file could be apr_stat()'ed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87933 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 22:45:35 +00:00
William A. Rowe Jr
7f4a5fe7f5 Use the appropriate APR_FINFO_flags for the apr_stat/lstat/getfileinfo
calls to avoid ownership and permissions on Win32 when they are not
  required, and until they are implemented.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87873 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 21:28:28 +00:00
William A. Rowe Jr
1dd9e07fd8 Accomodate the change to the apr_read_dir() arguments, and change all
apr_dirfoo() and apr_foodir() commands to apr_dir_foo() to match the
  earlier-renamed apr_dir_open().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87790 13f79535-47bb-0310-9956-ffa450edef68
2001-01-23 04:14:24 +00:00
William A. Rowe Jr
cd1ef027c2 The changes required for the APR_FINFO_wanted argument to
apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87760 13f79535-47bb-0310-9956-ffa450edef68
2001-01-20 21:42:23 +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
Doug MacEachern
40391fb9f2 adjust remaining modules to use the new handler hook method (Alan Edwards)
bring back the old handler prototype by reusing r->handler (dougm)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87617 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 23:55: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
83c2b3f96b Stop copying file names that we get from apr_file_t's and apr_dir_t's.
We copy the data when we store it in the structures, we can just return
a pointer from there, and use const data.  This puts the onus back on
Apache to copy the data if it needs to modify it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87592 13f79535-47bb-0310-9956-ffa450edef68
2001-01-05 19:40:05 +00:00
Ryan Bloom
40eae41078 Rename the apr_opendir symbol to apr_dir_open. This makes more sense,
and the rename was proposed a while ago inside of APR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87385 13f79535-47bb-0310-9956-ffa450edef68
2000-12-17 03:35:39 +00:00
William A. Rowe Jr
1b690e08fd Clean up some compiler warnings (there remain some float=double and
long=double warnings that didn't offer a simple answer at this moment.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87116 13f79535-47bb-0310-9956-ffa450edef68
2000-11-29 01:53:31 +00:00
Greg Stein
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
Ryan Bloom
02f60b7ea4 Allow modules to specify the first module for a sub-request. This allows
modules to not have to muck with the output_filter after it creates the
sub-request.  Without this change, modules that create a sub-request have
to manually edit the output_filters, and therefore skip the sub-request
output_filter.  If they skip the sub-request output_filter, then we end
up sending multiple EOS buckets to the core_output_filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87065 13f79535-47bb-0310-9956-ffa450edef68
2000-11-22 19:38:07 +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
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