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

315 Commits

Author SHA1 Message Date
Cliff Woolley
fa49b7942b Update to reflect the absence of the apr_bucket_shared
struct and the newly-added start field of the apr_bucket struct


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88372 13f79535-47bb-0310-9956-ffa450edef68
2001-02-27 21:02:15 +00:00
Cliff Woolley
93fe62dd77 Simplify by using apr_bucket_delete(e) where possible.
(Oh, plus one tiny little loop simplification.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88337 13f79535-47bb-0310-9956-ffa450edef68
2001-02-25 23:08:52 +00:00
Greg Stein
ee3fe477e3 *) fix inline handling. we had: apr_inline, APR_INLINE, USE_GNU_INLINE, and
INLINE. Now, we just have APR_INLINE and APR_HAS_INLINE.
   - convert all usage
   - note that apr_general messed up the defn (compared to apr.h)
   - simplify the inline decision logic in os/*/os.h
   - simplify the code in os/*/os-inline.c

*) toss ap_checkconv() [no longer used]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88298 13f79535-47bb-0310-9956-ffa450edef68
2001-02-24 11:23:31 +00:00
Greg Stein
e78825ca70 - more ap_conf_vector_t fixup.
- break out the cmd_parms to ap_set_config_vectors to clarify/doc what is
  happening in there and because the function operates independent of cmds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88227 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 04:26:13 +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
Ryan Bloom
78821bbf21 Remove the coalesce filter. With the addition of the ap_f* functions,
this filter is no longer necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88178 13f79535-47bb-0310-9956-ffa450edef68
2001-02-15 23:07:42 +00:00
Ryan Bloom
69f1ea01a9 Fix a warning when compiling with GPROF
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88076 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 00:10:30 +00:00
Greg Stein
5dc34feb12 *) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88061 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 14:04:21 +00:00
Ryan Bloom
0ed6a0d15c Change AddInputFilter and AddOutputFilter to SetInputFilter and
SetOutputFilter.  This corresponds nicely with the other Set
directives, which operate on containers while the Add* directives
tend to work directly on extensions.  [Ryan Bloom]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88042 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 00:33:38 +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
Bill Stoddard
1a3c98e63b Tweak the AP_MIN_SENDFILE_BYTES. Not using sendfile on Windows
in the general (non byterange) case is a HUGE performance hit (> 50% in many cases).
I also suspect most byterange requests will be for substantially more bytes (a pageful
out of a larger document for example). In the uncommon (I believe) cases where
fewer bytes are requested, 250 bytes per packet is not too abusive of the network.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87983 13f79535-47bb-0310-9956-ffa450edef68
2001-02-05 18:28:47 +00:00
Jeff Trawick
2407c615d0 avoid warning in non-AP_DEBUG build
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87957 13f79535-47bb-0310-9956-ffa450edef68
2001-02-02 18:15:42 +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
Ryan Bloom
fd0256ed99 filters can now report an HTTP error to the server. This is done
by sending a brigade where the first bucket is an error_bucket.
This bucket is a simple bucket that stores an HTTP error and
a string.  Currently the string is not used, but it may be needed
to output an error log.  The http_header_filter will find this
bucket, and output the error text, and then return
AP_FILTER_ERROR, which informs the server that the error web page
has already been sent.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87863 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 07:13:39 +00:00
Bill Stoddard
823e2e2bb2 Add the coalesce filter back in. It is NOT being installed anywhere right now.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87825 13f79535-47bb-0310-9956-ffa450edef68
2001-01-25 02:51:30 +00:00
Bill Stoddard
3f2a46a998 Remove the COALESCE_FILTER. It is no longer needed since Greg committed his ap_r*
buffering patch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87821 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 22:47:57 +00:00
Jeff Trawick
6a27a17c55 get http_core to compile on systems without apr_sendfile() support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87815 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 16:10:02 +00:00
Greg Stein
f95929d4b3 A single outermost loop is all that is needed. Simplify and add comments
about what is going on in there. Shift some declarations to scope their
usage and (re)initialize them on each pass over the brigade.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87811 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 06:17:26 +00:00
Greg Stein
c8d300bd44 Begin mod_core.h for CORE-private information. Ideally, AP_CORE_DECLARE
function decl's and CORE_PRIVATE header info should all move into this
header.

Start with moving the filter function declarations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87808 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 02:14:23 +00:00
Ryan Bloom
67ce413122 Loop over the brigade when multiple buckets file are found, instead of
breaking out of the function.
Submitted by:   Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87805 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 01:38:31 +00:00
Greg Stein
7ac64ef4c5 Improve the performance of the ap_r* functions by buffering their data in
[the context of] a new filter ("OLD_WRITE").

Further information/discussion of this patch is available on new-httpd
between Jan 16 and Jan 23, 2001.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87804 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 01:31:00 +00:00
Ryan Bloom
5de7834338 Allow the core_output_filter to deal with multiple file buckets in the
same brigade.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87801 13f79535-47bb-0310-9956-ffa450edef68
2001-01-23 23:23:37 +00:00
Ryan Bloom
24ad26fca5 Fix the core_output_filter. It doesn't make any sense to send less than
8K of a file using sendfile, it is easier to just read strings from the
file and use those strings directly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87800 13f79535-47bb-0310-9956-ffa450edef68
2001-01-23 23:05:12 +00:00
Ryan Bloom
32897f5a9f Fix the core to take the new file bucket type into account.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87794 13f79535-47bb-0310-9956-ffa450edef68
2001-01-23 07:31:09 +00:00
Ryan Bloom
b825ae06ca Remove AddModule and ClearModuleList. Neither directive really makes
much sense anymore, since we use the hooks to order modules correctly.
This also removes the possability that one module will ever register the
same function for the same hook twice.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87784 13f79535-47bb-0310-9956-ffa450edef68
2001-01-21 22:14:16 +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
de65e8cd0e 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.

  This needs further review, it's committed only as a stopgap for those
  who's builds I broke, sorry.  Review tbc late this evening.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87699 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 22:04:45 +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
Allan K. Edwards
0be0106405 add pool parameter to ap_is_directory and ap_is_rdirectory
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87593 13f79535-47bb-0310-9956-ffa450edef68
2001-01-05 20:44:44 +00:00
Ryan Bloom
bc1891795e Modify a couple of calls to ap_log_error with a NULL server to use
ap_log_perror, and pass a pool.  The keeps us from seg faulting if the
error log hasn't been opened yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87565 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 01:34:05 +00:00
Ryan Bloom
74383a7cae Because we can't get APR_EAGAIN from sendfile if we have a timeout, we
can simplify this test now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87545 13f79535-47bb-0310-9956-ffa450edef68
2000-12-28 23:27:20 +00:00
Ryan Bloom
39a2364a52 If we get EAGAIN returned from apr_sendfile, then we need to loop back and
call it again.  This change allows us to serve large files (such as
apache_2.0a9.tar.gz) using Apache 2.0 on FreeBSD.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87514 13f79535-47bb-0310-9956-ffa450edef68
2000-12-22 23:43:16 +00:00
Jeff Trawick
50cca38301 Remove an IPv4 dependency in do_double_reverse() by calling
apr_getaddrinfo() instead of gethostbyname().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87402 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 20:31:17 +00:00
Jeff Trawick
fbeea294ef Stop using apr_get_hostname(). It doesn't support IPv6 and it
is redundant.  apr_getnameinfo() provides the same function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87396 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 16:49:09 +00:00
Jeff Trawick
b1e8b050e9 The local_addr and remote_addr fields in the conn_rec are now
apr_sockaddr_t * instead of sockaddr_in.  This is a small step
towards IPv6 support.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87342 13f79535-47bb-0310-9956-ffa450edef68
2000-12-14 18:47:30 +00:00
Jeff Trawick
d870b177bd Fix some lvalue casts so that we can compile with xlc on AIX.
Submitted by:	"Victor J. Orlikowski" <v.j.orlikowski@gte.net>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87104 13f79535-47bb-0310-9956-ffa450edef68
2000-11-28 18:57:31 +00:00
Jeff Trawick
9fca860fbd fix an apr_size_t/apr_ssize_t discrepancy
Submitted by:	Victor J. Orlikowski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87097 13f79535-47bb-0310-9956-ffa450edef68
2000-11-28 00:17:38 +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
Ryan Bloom
798d259441 Modify the content-length filter to change the criteria used to determine
if/when we compute the content-length.  There are just a few cases now:

        1) We already have all the data
        2) We don't have all the data and:
                2a)  This is a 1.1 request but we can't chunk
                2b)  The is a keep-alive request
	    In the future, we probably want to modify this to not
	    be a keep-alive request.

This filter always buffers 9K of data.  The reason is simple, the core will
buffer 9K at a time anyway, and there is a chance that we may get the end
of the request before we hit 9K.  This increases our chances of being able
to send a c-l.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87055 13f79535-47bb-0310-9956-ffa450edef68
2000-11-21 20:17:20 +00:00
Jeff Trawick
d4df2029ae updates to changed interfaces to apr_set_port(), apr_get_port(),
apr_set_ipaddr(), and apr_get_ipaddr()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87050 13f79535-47bb-0310-9956-ffa450edef68
2000-11-21 19:10:25 +00:00
Greg Ames
6de8f5e454 Add partial write support for apr_sendfile to core_output_filter.
Big .jpg's ( >70K or so) were being truncated on Linux.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87041 13f79535-47bb-0310-9956-ffa450edef68
2000-11-20 22:39:17 +00:00
Ryan Bloom
7e991c23f8 Stop the default_handler from trying to deal with HEAD requests. By doing
this, the content-length filter can determine the C-L before we send the
response, and we get a better response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86955 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 06:11:24 +00:00
Ryan Bloom
22587a3209 Associate a pool with the pool bucket so that it serves it's intended
purpose.  This also moves the create_pool function outside of an if to
decrease complexity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86952 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 04:22:03 +00:00
Jeff Trawick
eb2e6db97a Get http_core to compile again after the last change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86949 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 02:13:41 +00:00
Ryan Bloom
1a00f1aaeb We can not use heap buckets for data that was allocated out of a pool.
The basic problem is that when the pool is destroyed, the data will go
away unless it is in a pool bucket.  If it is in a pool bucket, then the
data will be copied into a heap bucket when the pool is destroyed.  This
becomes a real issue when we set some data off to the side to deal with
pipelined requests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86947 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 01:46:39 +00:00
Ryan Bloom
d741d6832c Get the default_handler to use the bucket code directly. This keeps us
from traveling down the stack multiple time for a static page.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86944 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 23:42:40 +00:00