1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

405 Commits

Author SHA1 Message Date
William A. Rowe Jr
3731e4e4f7 Thank you again for the proxy autobuild reports ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90809 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 08:26:08 +00:00
William A. Rowe Jr
3641520e9f Changed syntax of Set{Input|Output}Filter. The list of filters
must be semicolon delimited (if more than one filter is given.)
     The Set{Input|Output}Filter directive now overrides a parent
     container's directive (e.g. SetInputFilter in <Directory /web/foo>
     will override any SetInputFilter directive in <Directory /web>.)
     This new syntax is more consistent with Add{Input|Output}Filter
     directives defined in mod_mime.  Also cures a bug in prior releases
     where the Set{Input|Output}Filter directive would corrupt the
     global configuration if the multiple directives were nested.
     [William Rowe]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90799 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 05:10:54 +00:00
William A. Rowe Jr
1a9639e088 Since the mod_mime patch was applied, here is the rest of the patch to
introduce the ForceType and SetHandler [absolute references] directly
  into the very top of the fixups phase.  This means these will always
  override _any_ mime module, not just mod_mime.  Ergo, other mime modules
  can continue to set charset, encodings, etc.  Since these are globals,
  they belong in the core.

  This highlights a very serious drawback to the type_checker hook.  By
  using run first, a module that identifies _partial_ information (maybe
  just the content type) won't pass the query on to other modules, like
  mod_mime, that might further define the encoding or charset.  The
  type_checker hook should clearly become a run-all, and the modules should
  decline if they see someone ahead of them answered a question they were
  going to try to figure.

  Which means - if type_checker becomes RUN_ALL - this new override hook
  fn should become a type_checker again - and RUN_REALLY_FIRST, and let
  other modules _choose_ not to override this election.  (We can run it
  again at the end, for a recount ;)  Votes?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90797 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 04:24:09 +00:00
William A. Rowe Jr
12912e8dbb This is the same granularity of control as mod_mime gave to set handlers
(and now AddInputFilter and AddOutputFilter by extension) so this seems
  entirely appropriate in the core as well.  Options FileInfo is required
  to change the processing behavior of files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90760 13f79535-47bb-0310-9956-ffa450edef68
2001-08-28 15:45:01 +00:00
Jeff Trawick
9855487db6 Fix a growing connection pool in core_output_filter() for
keepalive requests.  We were allocating a brigade out of the
connection pool; the number of these brigades allocated
per connection was theoretically unlimited.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90736 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 20:48:00 +00:00
William A. Rowe Jr
15cdc86233 Solve a bug I introduced this weekend, we want to compare core_*->r
as a boolean, not by value.

  Reported by: Barrie Slaymaker <barries@slaysys.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90729 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 16:35:43 +00:00
Doug MacEachern
68e7797264 apr_pstrcat args were not NULL terminated
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90698 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 17:38:14 +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
William A. Rowe Jr
307ab55886 Introduce the map_to_storage hook, which allows modules to bypass
the directory_walk and file_walk for non-file requests.  TRACE
  shortcut moved to http_protocol.c as APR_HOOK_MIDDLE, and the
  directory_walk/file_walk happen as APR_HOOK_VERY_LAST in core.c.

  A seperate patch to mod_proxy is required to short circuit both the
  TRACE and directory_walk/file_walk stuff.  That patch is next.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90665 13f79535-47bb-0310-9956-ffa450edef68
2001-08-25 23:43:19 +00:00
William A. Rowe Jr
bb757df043 sec, sec, who's got a sec? This gave me a headache, but I had to clear
out the last patch before I rearranged this to be _readable_.

  Next step for everyone's sanity, provide <Proxy > directives ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90646 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 18:12:02 +00:00
William A. Rowe Jr
6be8943643 Commit this code before another patch becomes to difficult to follow.
This patch does one thing, it changes the root path "/" to reflect an
  element count of Zero (0).  directory_walk will always accept the zero
  element (which sorts first, thankfully) on it's first go around.

  So, Unix will accept "/" when it's parsing it's first element "/".

  Dos/Win32 will accept "/" and "C:/" when they parse their first element,
  "C:/".  The root sorted first, so it behaves as users expect.

  The syntax "//" or "//machine" will be depreciated for now, the user
  needs to set up the extact "//machine/share/" that they want served
  on Win32.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90644 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 18:01:25 +00:00
William A. Rowe Jr
791e5eef89 Will I ever get my str*cmp semantics right? Not at this hour...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90611 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 03:45:21 +00:00
William A. Rowe Jr
744ab1e4a7 My initial changes failed to accomodate this faux entry.
If you didn't see any <Directory > blocks working right, try
  this cvs update.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90610 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 03:40:18 +00:00
Jeff Trawick
0171b0a5b9 fix fubar with recent commit to ap_core_translate()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90598 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 23:49:41 +00:00
William A. Rowe Jr
017d3624ed Fix my typo (I invented the silly constant, you would expect me to recall it.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90594 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 22:19:49 +00:00
William A. Rowe Jr
304f5cb2c8 Increase security in core.c by testing (as we merge the path) that the
URI does not go above the DocumentRoot (as defined by the OS, not by
  the URI specification), and give us the true name.

  When we are done, note the name is canonical for directory_walk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90593 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 22:17:19 +00:00
William A. Rowe Jr
1a1e251ca8 Start with the presumption that canonical_filename is not likely to be set.
Therefore we will canonicalize it when it doesn't match filename.

  The next optimization should take the path common to canonical_filename
  and filename, and start merging filename from there for canonicalization.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90591 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 21:56:36 +00:00
William A. Rowe Jr
503b17b20b Eliminated ap_os_[systemcase|[case_]canonical]_filename() and
changes for ap_os_is_path_absolute (moved to util.c).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90572 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 19:15:13 +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
Ryan Bloom
8006145310 Begin to sanitize the MPM configuration directives. Now, all
MPMs use the same functions for all common MPM directives.  This
should make it easier to catch all bugs in these directives once.

Everybody should check their favorite MPM to ensure that it still
compiles, and that these directives work.  This is a big patch, and
although it looks good, and things compiled for me, that is no
garauntee that it will work on all platforms.  :-)

Submitted by:	Cody Sherr <csherr@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90132 13f79535-47bb-0310-9956-ffa450edef68
2001-08-13 04:57:35 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
Ryan Bloom
cf2e6a1831 Remove all warnings from the input filtering stack.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89987 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 16:19:03 +00:00
Ryan Bloom
85e8fbd0e2 Add the ability to extend the methods that Apache understands
and have those methods <limit>able in the httpd.conf. It uses
the same bit mask/shifted offset as the original HTTP methods
such as M_GET or M_POST, but expands the total bits from an int to
an ap_int64_t to handle more bits for new request methods than
an int provides.
Submitted by:	Cody Sherr <csherr@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89869 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 04:25:20 +00:00
William A. Rowe Jr
203ca097b9 This patch fixes more untold breakage than you can shake a stick at.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89863 13f79535-47bb-0310-9956-ffa450edef68
2001-08-01 19:15:22 +00:00
William A. Rowe Jr
0eee59792b Provide the same optimization to the dir_config structure to track
d_is_absolute, along with d_is_fnmatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89791 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 18:51:57 +00:00
William A. Rowe Jr
10f9a8910c More obsessive changes to meet HTML 3.2, HTML 4.01 Transitional and
XHTML 1.0 Transitional


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89750 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 00:46:49 +00:00
William A. Rowe Jr
ed317a04fc Cliff's most sane advise :-)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89719 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 22:38:21 +00:00
William A. Rowe Jr
c9148bcd49 This same patch is needed in mod_asis and others, I'm testing the waters
for this solution.  I'm easily convinced to choose AP_MAX_SENDFILE based
  on any reasonable argument, provided it's smaller than 2^30 :-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89714 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 21:41:44 +00:00
William A. Rowe Jr
7b2c62a74e Changes to respect the new apr bucket and brigade length types (either
apr_size_t for bucket lengths, or apr_off_t for aggregate brigade lengths.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89683 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 20:38:01 +00:00
Ryan Bloom
3d8f3ce64b Make scoreboard creation a hook. This allows management
modules to have access to the scoreboard at the time that it is
created, and at every restart request.
Submitted by:	Cody Sherr <csherr@covalent.net>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89608 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 20:45:36 +00:00
Bill Stoddard
aedbb34ee7 Add error message and return if we fail reading from a bucket in the
core_outout_filter(). core_output_filter() is in need of a rewrite, it is
getting quite crufty.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89507 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 18:41:56 +00:00
Bill Stoddard
3ab4db196a emulate_sendfile() is a better name for what this function does. No function
change is made by this patch, only a static function name change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89506 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 18:07:24 +00:00
Cliff Woolley
29212e8c6b *) Account for the new pool parameter to apr_bucket_file_create()
and apr_bucket_file_make().

*) Simplify mod_file_cache's sendfile_handler by taking advantage
   the new ability of file buckets to handle files opened in XTHREAD
   mode.  [Also inlined some of the brigade construction stuff in
   mod_file_cache's handlers to save a palloc() or two.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89438 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:18:09 +00:00
Jeff Trawick
03a0359eb8 As with Apache 1.3, use priority APLOG_INFO (instead of APLOG_ERR) for
log messages which report network errors writing to the client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89384 13f79535-47bb-0310-9956-ffa450edef68
2001-06-18 12:38:17 +00:00
Ryan Bloom
afaf899642 Back out the change to allocate files out of the main request pool, and
implement pool-based setaside for FILE and MMAP buckets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89370 13f79535-47bb-0310-9956-ffa450edef68
2001-06-14 22:56:12 +00:00
Greg Stein
e5640cedcc Define a hook for fetching management/status items.
This patch was submitted by Ian Holsman. Greg revised some names, applied
the Apache style, and namespace-prefixed the public symbols. Minor bugfix in
the use of the hook implementation macro.

Submitted by: Ian Holsman <IanH@cnet.com>
Reviewed by: Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89364 13f79535-47bb-0310-9956-ffa450edef68
2001-06-13 20:11:45 +00:00
Ryan Bloom
66a61c359d Add a pool to the ap_save_brigade prototype. This removes a todo from
the comments that is really necessary before the setaside stuff will
work properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89362 13f79535-47bb-0310-9956-ffa450edef68
2001-06-13 13:44:40 +00:00
Greg Ames
4419b1ab32 Fix seg faults and/or missing output from mod_include. The
default_handler was using the subrequest pool for files and
MMAPs, even though the associated APR structures typically
live longer than the subrequest.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89354 13f79535-47bb-0310-9956-ffa450edef68
2001-06-12 19:03:08 +00:00
Ryan Bloom
0f8c1f462c We need to increment i during this for loop. Without this change, we will
end up in an infinite loop.
Submitted by:	Ryan Morgan


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89309 13f79535-47bb-0310-9956-ffa450edef68
2001-06-08 16:39:48 +00:00
Ryan Bloom
1c98aabbf1 Back out the recent change to ap_get_brigade, to make it use indirection
again.  The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters.  It is
possible for input filters to add bytes to the data read from the network.

To fix the original bug, I just removed the line from ap_get_client_block
that decremented r->remaining, we allow the http_filter to do that for
us.

I have also removed an incorrect comment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89041 13f79535-47bb-0310-9956-ffa450edef68
2001-05-06 23:27:14 +00:00
Greg Stein
5cba6d7345 Fix a bug in the input handling. ap_http_filter() was modifying *readbytes
which corresponded to r->remaining (in ap_get_client_block). However,
ap_get_client_block was *also* adjusting r->remaining. Net result was that
PUT (and probably POST) was broken. (at least on large inputs)

To fix it, I simply removed the indirection on "readbytes" for input
filters. There is no reason for them to return data (the brigade length is
the return length). This also simplifies a number of calls where people
needed to do &zero just to pass zero.

I also added a number of comments about operations and where things could be
improved, or are (semi) broken.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89008 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 11:18:01 +00:00
Bill Stoddard
91a89a9056 Set the conn_rec->aborted flag when we detect a whacked connection on the
write path.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88978 13f79535-47bb-0310-9956-ffa450edef68
2001-05-02 20:15:56 +00:00
Ryan Bloom
d807de8879 Fix the logic for saving data onto the heap before sending it. Basically,
we have to use nbytes+flen when figuring out how much data we have,
and when looking at the fact that we have a buffer to save aside before
sending it, we also need to look at the length, to ensure that we aren't
saving too much.
Submitted by:	Bill Stoddard and Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88972 13f79535-47bb-0310-9956-ffa450edef68
2001-05-01 21:59:26 +00:00
Ryan Bloom
d25aa600d2 AP_MIN_BYTES_TO_WRITE currently equals APR_BUCKET_BUFF_SIZE, so we
have to use <=


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88970 13f79535-47bb-0310-9956-ffa450edef68
2001-05-01 19:40:14 +00:00
Greg Stein
10ead4521a Add a comment about an assumption we make in our keepalive buffering.
Delay the check for "too many items in an iovec" until we actually try to
put something in there. This allows that N+1 bucket to be an EOS, FLUSH,
FILE, or zero-length bucket without triggering a split. Only if that next
bucket has iovec data will a split be made.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88969 13f79535-47bb-0310-9956-ffa450edef68
2001-05-01 18:43:09 +00:00
Ryan Bloom
fa2595bb24 Create Files, and thus MMAPs, out of the request pool, not the
connection pool.  This solves a small resource leak that had us
not closing files until a connection was closed.  In order to do
this, at the end of the core_output_filter, we loop through the
brigade and convert any data we have into a single HEAP bucket
that we know will survive clearing the request_rec.

Submitted by:	Ryan Bloom, Justin Erenkrantz <jerenkrantz@ebuilt.com>,
                Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88964 13f79535-47bb-0310-9956-ffa450edef68
2001-04-29 17:05:49 +00:00
Ryan Bloom
eb94b557ee At the hack-athon we decided to change the way that input filters
determine how much data is returned to the previous filter.  Prior to this
change, we used a field in the conn_rec to determine how much to return.
After this change, we use an argument to ap_get_brigade.  This makes it
much more obvious how things work at all levels, so that module authors
can easily determine how much data is supposed to be returned to them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88912 13f79535-47bb-0310-9956-ffa450edef68
2001-04-22 22:19:32 +00:00
Ryan Bloom
3cba58c98f When I initially pulled the BYTERANGE filter into the core, Greg Stein
told me I was wrong.  I was wrong, and Greg was right.  This commit
just moves the byterange filter and its related functions out of the core,
and puts them back in the HTTP specific module.
Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88815 13f79535-47bb-0310-9956-ffa450edef68
2001-04-11 23:37:16 +00:00
David Reid
3b2e5e5022 Move the error logging of a failed send into the core output filter. This
should catch errors in any way we send data.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88726 13f79535-47bb-0310-9956-ffa450edef68
2001-04-04 21:41:52 +00:00
David Reid
043396b7d0 This adds some simple error logging to send_the_file. There are a
lot more cases that we should log :(


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88700 13f79535-47bb-0310-9956-ffa450edef68
2001-04-03 19:32:19 +00:00