1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

383 Commits

Author SHA1 Message Date
William A. Rowe Jr
5e822a1c34 Return a decent message, in keeping with conf parsing semantics.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86313 13f79535-47bb-0310-9956-ffa450edef68
2000-09-24 20:13:42 +00:00
Jeff Trawick
ec6cfbd4ed Clean up a few warnings in core_filter().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86311 13f79535-47bb-0310-9956-ffa450edef68
2000-09-24 13:04:31 +00:00
Jeff Trawick
b98f31a568 The new core post_read_request hook needs to return something
(DECLINED).  This allows Apache to serve pages again (other than
the 500 Internal Server Error page, that is).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86309 13f79535-47bb-0310-9956-ffa450edef68
2000-09-23 22:09:30 +00:00
Ryan Bloom
d1a8073aa8 Combine the calls to add the core_filter to one place. Basically, it is
safe to add the core_filter during the post_read_request, and it means
that we only have to add the filter once in the code.  This should make
it easier to add an SSL module in the future.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86307 13f79535-47bb-0310-9956-ffa450edef68
2000-09-23 18:39:30 +00:00
Bill Stoddard
35b3a966f2 Make the core_filter use apr_sendv and apr_sendfile as appropriate. This is still a bit crufty
but it is an improvement over the previous implementation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86298 13f79535-47bb-0310-9956-ffa450edef68
2000-09-22 20:36:20 +00:00
Bill Stoddard
964740fd45 Fix error in setting bytes_sent. Need more time to think about the other problem
noted in this commit. Thanks Jeff!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86281 13f79535-47bb-0310-9956-ffa450edef68
2000-09-21 22:44:51 +00:00
Bill Stoddard
9115d6301c First cut at a file bucket. Modify the core_filter to handle use
of apr_sendfile(). Modify ap_send_fd() to use the new file bucket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86278 13f79535-47bb-0310-9956-ffa450edef68
2000-09-21 16:22:13 +00:00
Greg Ames
c0f7a5b2c8 Fix a bug where errors that happen during early request parsing (like 400
HTTP_BAD_REQUEST) don't send any error message content to the browser.
The core_filter wasn't present this early in request parsing, so the output
went into the bit bucket via r[v]puts->ap_pass_brigade.

The chunking filter takes care of itself nicely, because it is added in
ap_send_http_header if it's needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86253 13f79535-47bb-0310-9956-ffa450edef68
2000-09-19 21:11:01 +00:00
Ryan Bloom
96c98ff58b tart getting things setup for input filtering. All this basically does
is add part of the infrastructure.  Namely:

1) filter list in the conn_rec, which is where the input filter list
   must live

2) Split the register_filter into multiple functions, one to register
   input filters the other to register output filters.

3) Modify existing modules so they still work.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86251 13f79535-47bb-0310-9956-ffa450edef68
2000-09-19 20:56:09 +00:00
Ryan Bloom
29e68ae602 Change r->filters to r->output_filters. This sets things up for us to
put input filters into Apache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86246 13f79535-47bb-0310-9956-ffa450edef68
2000-09-18 01:24:55 +00:00
Jeff Trawick
cc23cc0866 Fix the types of the variables passed as the len parm to bucket->read()
(in various places).
In ab, change the declaration of argv so that it can be passed into
apr_initopt() without warning.
Submitted by:	Victor J. Orlikowski <v.j.orlikowski@gte.net>
Reviewed and modified slightly by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86229 13f79535-47bb-0310-9956-ffa450edef68
2000-09-14 18:42:58 +00:00
Ryan Bloom
fc05e522e0 Change AddFilter name to AddOutputFilter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86227 13f79535-47bb-0310-9956-ffa450edef68
2000-09-14 15:37:17 +00:00
Doug MacEachern
dad154a2ca put ctx back in ap_add_filter()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86224 13f79535-47bb-0310-9956-ffa450edef68
2000-09-14 05:08:42 +00:00
Tony Finch
154bfafb72 Improve the way the chunking filter handles zero-length buckets,
and fix the comment explaining how to reduce the incidence of tiny chunks.
Submitted by:	Jeff Trawick
Reviewed by:	Tony Finch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86222 13f79535-47bb-0310-9956-ffa450edef68
2000-09-14 02:16:07 +00:00
Ryan Bloom
9c295f8e68 Add the AddFilter directive. This directive takes a list of filter names
that have been previously registered with the server.  Currently the
directive is only valid inside the config file, but once the Options
directive is tweaked a bit, I would feel more comfortable exposing this
directive to htaccess files.

As a part of making adding this filter, I removed the ctx pointer from the
ap_add_filter prototype.  The problem is that the core is the thing that
is actually inserting the filter into the filter stack, but the core doesn't
know how to allocate memory for each filter.  The solution is to have the
filters themselves be responsible for allocating the ctx memory whenever
it is required.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86220 13f79535-47bb-0310-9956-ffa450edef68
2000-09-13 23:13:20 +00:00
Ken Coar
5d50a3e277 Start introducing the extension-method elements so we're not
bound to hard-coded names and a bitmask.  We still use the
	bitmask for known methods, but we also have an array for
	extension method named.  Wherever we used the M_* constants
	we need to use a routine that knows about the new structure instead.

	This is far from complete, but AFAIK this interim work doesn't
	break anything -- especially the compile.  The rest of the
	work will be added in segments; this is just a checkpoint.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86210 13f79535-47bb-0310-9956-ffa450edef68
2000-09-13 01:58:15 +00:00
Tony Finch
2e15f37567 Use XXX for comments describing inadequacies in the code, as in the rest
of Apache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86196 13f79535-47bb-0310-9956-ffa450edef68
2000-09-10 05:00:03 +00:00
Greg Stein
5a6282f94e pass_chunk() was tossing a brigade composed of just the EOS bucket. on
entry, it saw there were zero bytes and simply returned. the client
    would never receive "end of response" and timeout (or the server would
    timeout the client).

*) added comments about what is going on
*) place chunk start/end markers around just the content, if that content
   is non-zero in length
*) insert all the right "end of response" stuff before the EOS bucket


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86193 13f79535-47bb-0310-9956-ffa450edef68
2000-09-09 22:35:03 +00:00
Tony Finch
7ac6ab9f51 Use wrapper macros to avoid the verbosity of the AP_RING macros when
doing things with bucket brigades.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86185 13f79535-47bb-0310-9956-ffa450edef68
2000-09-09 06:48:10 +00:00
Tony Finch
7f4afedb57 Fix inserting elements at the head and tail of a ring when the ring is
empty. Avoiding referring to the element type in the macros resulted
in some double dereferences that did the wrong thing.
Reported by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86184 13f79535-47bb-0310-9956-ffa450edef68
2000-09-09 01:11:15 +00:00
Tony Finch
6d7be19c90 Reduce the manualarity of managing bucket brigade lists by using the
new AP_RING macros. Most of this commit is fairly pedestrian as you
would expect, but I had to redo the chunking filter because of the
amount of pointer juggling it did. I have done some minimal testing
of this patch and it seems to work.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86178 13f79535-47bb-0310-9956-ffa450edef68
2000-09-08 10:16:14 +00:00
Jeff Trawick
3b64d1dfdf Fix merging of AddDefaultCharset directive.
PR:		5872 (reported against 1.3)
Submitted by:	Jun Kuriyama <kuriyama@imgsrc.co.jp>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86176 13f79535-47bb-0310-9956-ffa450edef68
2000-09-07 23:51:36 +00:00
Greg Stein
a1d3d62fc6 reversing the latest commit; it was vetoed a while back.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86162 13f79535-47bb-0310-9956-ffa450edef68
2000-08-30 01:09:09 +00:00
Ryan Bloom
eab77d60ac Modify the way filters are added to the server. Instead of using a FIFO,
we use a modified LIFO.  It is modified, because if we add a filter while
in the middle of another filter, the added filter gets put in after the
current filter.  This requires that the server is smart about which filters
are added when.  This should be handled by the HTTP protocol, but we will
want to keep and eye on things for a little while.

This change is necessary, because currently when we add a filter it goes
after the last filter of the same type.  This is broken whenever we want
to add a filter that has a dependancy.  Think about the core and chunking
filters.  They are of the same type, and core is always added first.  When
we go to insert chunking, it gets added, but it is never called.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86161 13f79535-47bb-0310-9956-ffa450edef68
2000-08-29 22:16:45 +00:00
Jeff Trawick
f357ceef76 Filters (and thus ap_pass_brigade()) now return an apr_status_t as their
return value.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86160 13f79535-47bb-0310-9956-ffa450edef68
2000-08-29 20:57:29 +00:00
Jeff Trawick
d94ed1313d Stop using strlen() for the size of an array. It isn't valid C
(though gcc was happy with it).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86159 13f79535-47bb-0310-9956-ffa450edef68
2000-08-29 20:21:30 +00:00
Jeff Trawick
933a5d5736 Update chunk_filter to handle buckets with unknown length (e.g., pipes).
As soon as we hit such a bucket, we'll read from it then pass everything
we have so far on to the next filter.  At that point we'll start over.

Also, increase the size of the chunk header buffer to handle larger
lengths.

Note: There is still an extra final chunk header (0) when mod_cgi is used
because EOS is coming down twice.

This is likely to have some bugs here and there.  Even worse, it is butt
ugly and in need of simplification.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86155 13f79535-47bb-0310-9956-ffa450edef68
2000-08-28 20:36:42 +00:00
Ryan Bloom
ae7cca1bd9 Remove IOLs from Apache. They are no longer necessary, now that we have
filtering beginning to work.  There is a hack that has been repeated
through this patch, we morph a pipe into a socket, and put the socket
into the BUFF.  Everytime we do that, we are working with a pipe from
a CGI, and we should be creating a pipe bucket and passing that bucket
back.  Because we don't actually have pipe buckets yet, we are using this
hack.  When we get pipe buckets, this will be fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68
2000-08-23 00:01:58 +00:00
Tony Finch
e577544881 Add generic support for reference-counting the resources used by
buckets, and alter the HEAP and MMAP buckets to use it. Change
the way buckets are initialised to support changing the type of
buckets in place, and use it when setting aside TRANSIENT buckets.
Change the implementation of TRANSIENT buckets so that it can be
mostly shared with IMMORTAL buckets, which are now implemented.

Reviewed by:	rbb


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86115 13f79535-47bb-0310-9956-ffa450edef68
2000-08-19 06:04:57 +00:00
Ryan Bloom
6545ce8d02 Fix chunking. Two bugs fixed.
1)  don't put the trailing 0\r\n\r\n in lenstr; that buffer is
    already in use (pointed to by another transient bucket); using
    lenstr again overlays that other chunk header
2)  insert the bucket with the trailing "0\r\n\r\n" *before* the eos bucket
Submitted by:	Jeff Trawick <trawickj@bellsouth.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86095 13f79535-47bb-0310-9956-ffa450edef68
2000-08-18 04:46:07 +00:00
Greg Stein
209770a679 temp fix for filter ordering: +1 on the core filter's type.
bug fix in chunk_filter(): it was creating the wrong-size bucket.

chunking now appears to be working (without using BUFF).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86092 13f79535-47bb-0310-9956-ffa450edef68
2000-08-17 01:39:12 +00:00
Ryan Bloom
032972c119 A first pass at the chunking filter. This is incredibly simple. As
bucket brigades are sent to this filter, it inserts the chunking header
at the front of the brigade.  When the filter sees an EOS bucket, it
adds the 0 chunking trailer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86090 13f79535-47bb-0310-9956-ffa450edef68
2000-08-17 00:54:03 +00:00
Greg Stein
d954f484ab fix the insertion of the CORE filter. it should be happen last.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86084 13f79535-47bb-0310-9956-ffa450edef68
2000-08-16 19:03:28 +00:00
Ryan Bloom
b0f3a1dfcb Remove a bunch of warnings from the server when compiled using
--with-maintainer-mode


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86070 13f79535-47bb-0310-9956-ffa450edef68
2000-08-14 03:07:58 +00:00
Ryan Bloom
b036ef293a Cleanup the buckets a bit, and add ScanDoc comments. The cleanup was
basically removing functions that aren't really necessary anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86063 13f79535-47bb-0310-9956-ffa450edef68
2000-08-13 00:53:43 +00:00
Ryan Bloom
35d4c4a58c Initial Filtering code. This uses a bucket brigade scheme to allow modules
to add and modify data while processing a request.  The docs still need
to be updated, and a simple html page needs to be created explaining all
of this.

The only filter currently in the code is the core filter.  This filter
takes a bucket brigade and writes it to the network through the buff
structure.  In time, the buff will go away completely.

More filters will need to be written.
Submitted by:	The Apache Community
Reviewed by:	The Apache Community


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86059 13f79535-47bb-0310-9956-ffa450edef68
2000-08-12 18:45:35 +00:00
Ken Coar
ce7baf6d90 Allow <Limit*> to accept arbitrary extension method named instead
of varfing.  Nothing takes advantage of this yet; that's coming
	next.  Also replace the shorthand Allow setup to use the new
	API (this is possibly a problematical change for the core default
	handler; no problem to back that out).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86057 13f79535-47bb-0310-9956-ffa450edef68
2000-08-12 00:00:08 +00:00
Jeff Trawick
99cf606197 Fix some problems with the apr conversion so that APACHE_XLATE builds work
again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86018 13f79535-47bb-0310-9956-ffa450edef68
2000-08-07 19:26:02 +00:00
William A. Rowe Jr
1a9db204f5 Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +00:00
Doug MacEachern
059d8dd212 prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85976 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 05:27:38 +00:00
Ryan Bloom
fe64231023 Move the Server Token stuff out of http_config_globals.h because it is
now isolated in http_core.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85941 13f79535-47bb-0310-9956-ffa450edef68
2000-07-29 19:50:08 +00:00
Ryan Bloom
a8924ba469 Remove EXEC_ON_READ from ClearModuleList and AddModule. Having these
as EXEC_ON_READ was causing a seg fault, and it was unnecessary.  Neither
of these directives changes how the server interprets the config file,
they only change how the server responds to the configuration.
PR:	6318


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85883 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 05:35:34 +00:00
William A. Rowe Jr
f5cd4a7017 Caught a bit of my own bad style :)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85879 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 01:36:28 +00:00
William A. Rowe Jr
847b20108c Add APR_EOL_STR for a platform specific text delimiter, provided by
apr.h (defined in apr.h.in and apr.hw).  This is needed -only- in APR
  created files (true raw files) such as logs.  It is not required in any
  splat to screen (stderr/stdout) formatting, nor any html markup.

  Some other modules slipped through in the prior apr_strings.h commit.
  Sorry 'bout that.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85878 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 01:06:32 +00:00
Ryan Bloom
22d9fbdec0 Move all APR functions related to strings to their own directory, and
create a new header for those functions.  This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85867 13f79535-47bb-0310-9956-ffa450edef68
2000-07-21 19:50:58 +00:00
Ryan Bloom
98514ba315 Fix a warning associated with the ap_send_fd change from earlier today.
This just changes a couple of long's to ap_size_t.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85817 13f79535-47bb-0310-9956-ffa450edef68
2000-07-11 03:48:18 +00:00
Greg Stein
71aeeddbe2 shift the LimitXMLRequestBody directive to the core. use it from util_xml.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85816 13f79535-47bb-0310-9956-ffa450edef68
2000-07-11 00:06:22 +00:00
Bill Stoddard
6aa73a79bc Reimplement ap_send_fd. Eliminate ap_send_fd_length. If APR_HAS_SENDFILE is
defined but ap_sendfile fails with APR_ENOTIMPL, the BUFF implementation
of ap_send_fd will get a shot at serving the request.  This fix is
required to get Apache working on 95/98 again and can also be useful on
Unix systems where sendfile is available via a servicepack/fixpack/PTF
on a particular level of the OS (e.g., AIX 4.3.2 base does not include
sendfile but is is available with a PTF).

This fix also reimplements the mod_file_cache sendfile_handler using
ap_send_fd and sets the connection aborted flag if the sendfile fails.

Future modification... Add code to ap_send_fd to hijack any data in the
client BUFF structure and send it along with the sendfile.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85810 13f79535-47bb-0310-9956-ffa450edef68
2000-07-10 21:49:22 +00:00
Jeff Trawick
b5c0ae056b Include strings.h for strcasecmp(), strncasecmp(), and bzero().
Include time.h for time().

This removes a bunch of compiler warnings with gcc -Wall on AIX.
Submitted by:	Jeff Trawick, Victor Orlikowski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85723 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 14:33:48 +00:00
William A. Rowe Jr
8d92b2f40a Whoops... will be needing this exported rsn for mod_mmap_static. But the
argument to register hook fn takes a __cdecl function, so _NONSTD it is.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85716 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 07:55:44 +00:00