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

144 Commits

Author SHA1 Message Date
William A. Rowe Jr
5a47e71a1b Many of our platform's apr_dir_read() aren't returning APR_FINFO_TYPE,
so we will take the long way through (and the long way for LNK's as well.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93080 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 17:46:30 +00:00
Greg Ames
a01fa5a9cb backing out fix for missing path info and query string. wrowe beat me to
it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93062 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 21:18:10 +00:00
Greg Ames
b7f4e23a1b handle_multi: pass along the original path info and query string if
we redirect due to negotiation

pointed out by: Bill Rowe

also, clarify what some code in handle_map_file is doing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93061 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 18:43:19 +00:00
William A. Rowe Jr
ec31c6ad8e Shortcut where the resource has no language [discovered with no
DefaultLanguage in cgi-bin, resolving Greg Ames' observations, we
  had a lurking segfault.]

  This begs the question, what exactly did the fn do with no language
  in terms of serving content back in 1.3.  Should be reviewed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93046 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 07:47:30 +00:00
William A. Rowe Jr
011c7375e9 Which PR? I can't count them all. Get QUERY_STRING and PATH_INFO
working again.  Also rounds out our fix to work around negotiated
  directories which Greg Ames fixed; this addition in request.c simply
  shortcuts all further processing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93045 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 07:44:07 +00:00
William A. Rowe Jr
d9fe304191 Need a null language_priority array for an either/or choice in the
conf merge.  This does so.  The merges should be significantly quicker.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92696 13f79535-47bb-0310-9956-ffa450edef68
2002-01-01 19:09:05 +00:00
William A. Rowe Jr
e4a31acb58 Thanks Mr. Trawick, backtraces can be very enlightening.
This fixes two bugs, the segfault when researching index numbers,
  and another.  We don't hint anywhere that LanguagePriority is a
  cumulative setting, in fact the syntax doesn't suggest so either.
  Merges are always slow, there is no reason to make this even slower.

  So the patch has the LanguagePriority directive override any existing
  LanguagePriority list from an earlier container.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92695 13f79535-47bb-0310-9956-ffa450edef68
2002-01-01 19:01:39 +00:00
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