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

353 Commits

Author SHA1 Message Date
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
Bill Stoddard
a6e345e104 Update coalesce filter to use heap buckets rather than pool buckets. This should fix the
mod_autoindex funky chunking behaviour until the ap_r* routines are reimplemented, at which
time this filter should probably go away.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86943 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 22:52:19 +00:00
Ryan Bloom
f53ac5876c The core handler should never close a file, because we haven't actually
sent the file yet.  This also removes the send_http_headers call, because
that's a no-op so it doesn't make much sense to leave it in.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86938 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 14:19:41 +00:00
David Reid
2377bb2ae0 More local/remote changes and tidy up http_vhost a bit.
Also add a new function to get an ap_ina_addr_t from a socket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86910 13f79535-47bb-0310-9956-ffa450edef68
2000-11-10 16:11:14 +00:00
Ryan Bloom
3ce94ea58f Remove MMAP handling from the default handler. MMAPs are created by the
file_bucket read function now.  If we try to read from a file bucket and
it makes sense to convert that bucket to an MMAP, that just happens.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86894 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 22:05:40 +00:00
Jeff Trawick
e935210c99 Simplify the call to ap_send_fd().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86888 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 13:36:01 +00:00
Ryan Bloom
07390aa8cf Use the content-length filter to compute the content-length for byterange
requests.  This allows the byterange filter to work with the PDF plug-in.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86880 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 03:33:24 +00:00
David Reid
ee4d19790d This adds the APR_LOCAL/APR_REMOTE to APR and changes the apr_get/set_port
functions to use it.  This is onyl the start and I'll pause a while before
I continue in case people really hate this.  The patch can be backed out and
all evidence will be removed, but I think this makes maintaining/developing
the code easier in the long term.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86870 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 14:47:33 +00:00
David Reid
73a6c4c81f Doh! Missed this from the last commit...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86868 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 11:48:09 +00:00
David Reid
33aabfee3f Start of moving to apr_port_t in the server code. This will probably the first
of a few...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86866 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 11:35:38 +00:00
Ryan Bloom
16d27f0da6 The byte-ranges filter. This looks like it should work, but the
Acrobat plug-in doesn't like it for some reason.  This does work better
than what we currently have, because at least it returns all of the
requested data.  This basically removes all BUFFs from the byte-range
code and removes all of the byte-range code from the default-handler.

Byte-ranges are now handled by a filter, which makes sense, and it allows
us to handle byte-ranges for all requests, not just files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86864 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 06:24:47 +00:00
Ryan Bloom
0225f3424a Fix a compile break. ap_set_content_length is a void function now, so we
can't check the return code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86862 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 02:46:00 +00:00
Ryan Bloom
134dbc9e7a Convert a lot of apr_ssize_t to apr_size_t. We don't ever accept or return
signed values in these integers, and we return the error codes directly,
so we should always report the number of bytes read/written correctly.  If
we have an error, that is 0 bytes.  If that is true, then using signed
values doesn't make any sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86857 13f79535-47bb-0310-9956-ffa450edef68
2000-11-07 20:21:55 +00:00