1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

666 Commits

Author SHA1 Message Date
Aaron Bannert
bb447fc0c5 Cautiously avoiding the scoping issue that was discussed on the list,
I thought these other changes needed to go in; Namely that we don't
need to check if the brigade is empty twice in the loop, just once.
Added a comment for good measure.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91478 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 01:04:08 +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
Justin Erenkrantz
d55c3c855b Ensure that ap_http_filter can not be coersced into reading more than we
think is currently available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91462 13f79535-47bb-0310-9956-ffa450edef68
2001-10-14 20:38:04 +00:00
Justin Erenkrantz
11b85e17ba Remove deprecated ap_dechunk_filter from header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91434 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 19:44:51 +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
Ryan Bloom
0385ad938a Remove some warnings from the code. The buckets take a different
type for the length than the brigade functions do.  This moves the
len_read variable into the correct scope for the two times that it
is used, and defines it correctly for each scope.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91417 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 04:40:14 +00:00
Justin Erenkrantz
5c26e8775c We can't pass in &r->remaining because we change that value on output to
be how many bytes we read.  This trounces on the r->remaining value, so
we must use a local variable and subtract that from r->remaining after we
read.
Reviewed by:	Aaron Bannert


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91413 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 01:40:32 +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
Greg Stein
173d083ed0 HTTP_IN was attempting to process the PEEK mode. This threw off
check_pipeline_flush(), making it think another request was available (when
it wasn't). Apache would avoid flushing the prior request and block on
reading the next request. (of course, the client wasn't sending the next
one, cuz it was still waiting for the results of the first one)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91366 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 20:12:50 +00:00
Ryan Bloom
e4322fb2e1 Fix --enable-mods-shared processing. If most is specified,
then all modules that can be compiled as shared modules are.  This
was done by adding a module config specifier, static, which denotes
that a module can not be compiled as a DSO.

Submitted by:   Aaron Bannert <aaron@clove.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91262 13f79535-47bb-0310-9956-ffa450edef68
2001-10-03 17:47:51 +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
8b54a808a9 Remain consistent to the connection_rec, and use apr_off_t for remaining.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91216 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 15:48:15 +00:00
Justin Erenkrantz
40304cb1ee Remove unnecessary initialization and add a comment about chunk_hdr's
scope.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91209 13f79535-47bb-0310-9956-ffa450edef68
2001-09-30 04:17:16 +00:00
Justin Erenkrantz
9846f649bf Switch to the corresponding apr_table_* macro rather than doing this
ourselves.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91207 13f79535-47bb-0310-9956-ffa450edef68
2001-09-30 01:37:20 +00:00
Justin Erenkrantz
0706716dbb Cleanup some needless initialization of the date variable and consolidate
the scope to only where necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91206 13f79535-47bb-0310-9956-ffa450edef68
2001-09-30 01:17:13 +00:00
Justin Erenkrantz
66ee5533d3 Remove the lameo create_req hack and delay the addition of the HTTP_IN
filter until after we have read the headers.  This eliminates the status
hack that was in http_protocol.c and makes it all around better.

server/protocol.c now directly adds HTTP_IN filter - should we create a
specific hook for this?  (Could we do this as a post_read_request hook?)
I'm not terribly sure, but let's move it down to the lowest possible
place in ap_read_request.  We can change this detail later as we see fit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91192 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:48:59 +00:00
Justin Erenkrantz
fa9432b44a Remove bogus comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91190 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:29:18 +00:00
Justin Erenkrantz
08eb7609da Input filtering rewrite. Consolidate how we handle HTTP input parsing by
rearranging and rethinking some things.  The net result is that the HTTP
filter is now a request filter and is now only responsible for HTTP things.
The core input filter is now responsible for handling all of the dirty work.

Highlights:
- Removes the dechunk filter and merges it with ap_http_filter (aka HTTP_IN).
  The dechunk filter was incorrectly handling certain cases (trailers).
- Moves ap_http_filter from a connection filter to a request filter
  to support the consolidation above (it needs header info).
- Change support code to allow the http_filter to be a
  request filter (how the request is setup initially).
- Move most of the logic from HTTP_IN to CORE_IN (core_input_filter).
  HTTP_IN is now only concerned about HTTP things.  The core filter
  is now responsible for returning data.  It is impossible to
  consolidate dechunk and http without this because HTTP_IN previously
  buffered data.  As Greg has suggested, it may make sense to write
  some brigade functions that handle input (getline).  It should be
  fairly trivial to add these.  Some of the calls in ap_http_filter
  could be switched as well.

This is the original patch as submitted to dev@httpd on Monday, Sep.
24th.  Additional comments and some minor tweaks done after that
submission are coming up next.  This should allow people who reviewed
the original patch to see what has changed and review them piecemeal.

This test passes all current tests in httpd-test.  Please perform
chicken sacrifices to verify that this hasn't blown up your favorite
input.

Reviewed by:	Greg Stein, Ryan Bloom, and Cliff Woolley (buckets)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91189 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:17:11 +00:00
Jeff Trawick
8b31569e09 Currently, when the map-to-storage handler for TRACE returns DONE, the
caller -- ap_process_request_internal() -- catches that and returns
OK to its caller -- ap_process_request().  But ap_process_request(),
seeing OK, tries to run a handler.  It needs to skip that if the
request was completed in ap_process_request_internal().

Reviewed by:	William A. Rowe, Jr.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91095 13f79535-47bb-0310-9956-ffa450edef68
2001-09-20 17:54:51 +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
Greg Stein
0d93863aa4 Temporary hack to ensure that the split results are within a brigade
attached to the proper pool. Otherwise, ctx->b would end up associated with
the request pool, and the SOCKET bucket from the CORE_IN filter would get
cleared at request end (thus the next request would go to CORE_IN for more
data and get APR_EOF, and figured there were no more requests).

This section of code was only triggered when a request had a body. The
symptom was closing the connection (even though it should have been a
keepalive) after the response was sent.

For more info, see Message-ID on dev@: <20010917061613.B466@lyra.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91053 13f79535-47bb-0310-9956-ffa450edef68
2001-09-17 13:12:37 +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
Ryan Bloom
57b309fdd1 Fix logging of bytes sent for HEAD requests. %b and %B should
log either - or 0, before this patch, they were both logging
the file size.

PR:	8021
Submitted by:	Taketo Kabe <kabe@sra-tohoku.co.jp>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90870 13f79535-47bb-0310-9956-ffa450edef68
2001-09-02 03:21:47 +00:00
William A. Rowe Jr
76eef7ccce Now that stinks, sorry. In moving code - I didn't notice my code
now served out (r) info instead of the (rnew) info.  Made for nasty
  cyclic loops in mod_dir :(

  It looks like this works once again.  I'll post completed deltas to
  the list ASAP.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90838 13f79535-47bb-0310-9956-ffa450edef68
2001-08-31 03:49:42 +00:00
William A. Rowe Jr
d78dd20618 Much better - sorry - I missed one case of forcing pipeline flush when
the handler returned a non-OK result.  ergo, 304's weren't sent.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90837 13f79535-47bb-0310-9956-ffa450edef68
2001-08-31 02:46:29 +00:00
William A. Rowe Jr
96c3ce2961 After calling ap_process_request_internal(), the caller must invoke
the handler themselves.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90835 13f79535-47bb-0310-9956-ffa450edef68
2001-08-31 02:29:48 +00:00
William A. Rowe Jr
3db323656f Normalize all paths to run the same, common code for pre-request setup
from the primary request, redirects and sub-requests.

  This will significantly reduce opporunities for inconsistancy (such
  as Ian observed, and as I repaired only a month ago.)

  This promotes process_request_internal to an ap_ namespace protected
  entity in server/request.c (from it's old home in http/http_request.c)
  since this fn has no http specifics.

Reviewed (in concept): Cliff Woolley, Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90832 13f79535-47bb-0310-9956-ffa450edef68
2001-08-31 01:38:06 +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
46a6922999 backing out the ap_set_keepalive uncheck for Content-Length header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90707 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 20:09:52 +00:00
Doug MacEachern
1a461cd85c ap_content_length_filter has already set Content-Length
before ap_set_keepalive is called.  need to remove this check
in order for keepalives to work.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90700 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 18:57:16 +00:00
William A. Rowe Jr
d9dee61f75 Readded "downgrade-1.0" which I (inadvertantly) pulled with the
map_to_storage patch.  I knew it had to have a better home, and
  it sure looks like this is it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90683 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 04:59:37 +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
bdaf32fa88 Downgrade must occur before we attempt to TRACE, e.g., for clients with
broken chunking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90658 13f79535-47bb-0310-9956-ffa450edef68
2001-08-25 17:48:52 +00:00
Cliff Woolley
95a67f5150 Just a little extra commentary...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90649 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 20:38:27 +00:00
Cliff Woolley
64dd7641e7 Fix a double-free condition when byterange requests are made on brigades
containing any bucket that cannot be copied natively (ie, pipe or socket
buckets).

Before, we were reading that bucket to morph it to a heap bucket and then
taking the str that heap bucket points to and placing it in a second,
completely separate heap bucket.  That means we'd have two apr_bucket/
apr_bucket_heap pairs each with a refcount of 1 (rather than two apr_buckets
and a single apr_bucket_heap with a refcount of 2).  str would then be
doubly-freed when the second of those two buckets was destroyed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90648 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 20:27:40 +00:00
William A. Rowe Jr
13cff90a55 Two cases we are certain of canonical correctness
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90586 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 21:05:42 +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
William A. Rowe Jr
65e3920e8e Just chasing nits
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90425 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 20:42:31 +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
6d654c07cd Based on the VC6 switch - and pulling the win32 make files from cvs
- some more ignores are in order.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90274 13f79535-47bb-0310-9956-ffa450edef68
2001-08-17 07:19:08 +00:00
William A. Rowe Jr
ebf7a3fe03 Ignore goodness
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90250 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 23:14:06 +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