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

523 Commits

Author SHA1 Message Date
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
Ken Coar
023faddf07 Do a bunch of style-guide fixups (like wrapping Boolean tests
correctly and enblocking singel-statement if()s).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86209 13f79535-47bb-0310-9956-ffa450edef68
2000-09-13 01:36:01 +00:00
Ryan Bloom
9acfd7de2d Ensure that only one EOS bucket is sent down the filter stack. This is
done by adding a flag to the request_rec.  When ap_pass_bucket sees an
EOS bucket, the flag is set.  If the flag is still unset when
ap_finalize_request is called, then ap_finalize_request sends an EOS.  This
fixes the problem with chunking and CGI.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86202 13f79535-47bb-0310-9956-ffa450edef68
2000-09-12 03:40:15 +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
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
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
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
Jeff Trawick
87f6dead16 Fix charset translation breakage on EBCDIC machines... the core turned
on buff's translation by default, but mod_charset_lite (when configured
to do so) turned on its own filter-based translation, resulting in
gibberish.

To be determined... whether or not mod_charset_lite should enable
translation of text objects by default (a la 1.3)...  probably... for
now you have to tell mod_charset_lite to translate.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86135 13f79535-47bb-0310-9956-ffa450edef68
2000-08-22 18:01:47 +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
Jeff Trawick
dfee69c79b Fix type of bytes_sent parm passed to ap_bucket_mmap_create().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86106 13f79535-47bb-0310-9956-ffa450edef68
2000-08-18 18:48:11 +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
8c30c026e6 prevent zero-length-content brigades from entering the filter chain
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86088 13f79535-47bb-0310-9956-ffa450edef68
2000-08-16 21:29:34 +00:00
Greg Stein
1e260bd17a fix timing of the EOS bucket delivery
fix ap_rputc()
note some problems with subrequest finalization and ap_rflush()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86086 13f79535-47bb-0310-9956-ffa450edef68
2000-08-16 20:39:57 +00:00
Ken Coar
fd1c44be04 Make compilable on Windows again. I'm not sure the x = { [1] = 1 }
syntax is even ANSI C, but it originally compiled for me.  Oh, well.
	I'd rather have this statically built at compile time, but I don't
	want to add the dependencies on the method order and its being
	a contiguous sequence.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86073 13f79535-47bb-0310-9956-ffa450edef68
2000-08-14 21:33:27 +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
001a3da2cd More prototypical API support for arbitrary extension HTTP methods.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86054 13f79535-47bb-0310-9956-ffa450edef68
2000-08-11 23:45:57 +00:00
Jeff Trawick
f379bdda77 Get rid of an ancient comment (which was updated for the CHARSET_EBCDIC
->APACHE_XLATE change.  Once I figured out what "32/9" meant (doh!)
it was pretty clear that the comment is no longer applicable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86051 13f79535-47bb-0310-9956-ffa450edef68
2000-08-11 16:31:40 +00:00
Ken Coar
5bc475f394 Whoops, head off a potential segfault. The array is only
created at need, so check for its existence before trying
	to peek into it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86047 13f79535-47bb-0310-9956-ffa450edef68
2000-08-10 13:28:45 +00:00
Jeff Trawick
df5ed41b51 Change use of ap_pstrcat() to apr_pstrcat() in previous commit so
that Apache builds again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86044 13f79535-47bb-0310-9956-ffa450edef68
2000-08-10 12:46:52 +00:00
Ken Coar
702dd42deb Add support for arbitrary extension methods for the Allow
response header field, and an API routine for modifying the
	allowed list in a unified manner for both known and extension
	methods.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86043 13f79535-47bb-0310-9956-ffa450edef68
2000-08-10 11:22:57 +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
f89738e6b6 Add the ability to register filters. This commit introduces a warning
into the build.  This warning will be removed automatically, as soon as
we decide on a prototype for the function causing the warning.  That
decision is tied to which filtering mechanism we decide on.
Submitted by:	Ryan Bloom and Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85926 13f79535-47bb-0310-9956-ffa450edef68
2000-07-28 20:31:02 +00:00
Jeff Trawick
891b6a680a packet minimization when doing sendfile...
When preparing to call iol_sendfile(), don't call ap_bflush() first.
Instead, pass the data ap_bflush() would have written (if any) to
iol_sendfile() as a header.  In practice, this prevents sending headers
separately from the first part of the file.
Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85895 13f79535-47bb-0310-9956-ffa450edef68
2000-07-26 14:29:34 +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
0207f837c4 Apache doesn't actually check for stdarg.h, but APR does. Just use the
APR defined APR_HAVE_STDARG_H to check for the existance of stdarg.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85833 13f79535-47bb-0310-9956-ffa450edef68
2000-07-13 16:26:47 +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
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
3ab487fe5f Fix the way that ap_rwrite() checks for an error from ap_bwrite().
A dropped connection could cause a loop in ap_send_mmap() (and probably
a few other places) because of this problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85778 13f79535-47bb-0310-9956-ffa450edef68
2000-07-06 21:25:19 +00:00
Bill Stoddard
edb2fa4611 WinNT: Implement acceptex socket reuse. Make sure that the ap_sendfile flags
argument is properly initialized for all platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85775 13f79535-47bb-0310-9956-ffa450edef68
2000-07-06 15:13:30 +00:00
Ryan Bloom
0966bdbdfa Remove some warnings from the latest compile. I don't know why these
haven't turned up before.  We were using the wrong types in our printf
calls for times.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85767 13f79535-47bb-0310-9956-ffa450edef68
2000-07-05 18:01:52 +00:00
Greg Stein
d02f5c7aba add ap_get_status_line() so that modules can get a standardized
Status-Line value for their response.

Submitted by: Joe Orton <joe@orton.demon.co.uk>
Reviewed by: Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85762 13f79535-47bb-0310-9956-ffa450edef68
2000-07-04 00:28:25 +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
Jeff Trawick
a5999a66ae Fix the type of the 5th argument to iol_sendfile().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85698 13f79535-47bb-0310-9956-ffa450edef68
2000-06-26 17:25:52 +00:00
Ryan Bloom
8b17259223 Fix a couple of const warnings on Linux. This basically just defines
ap_strstr and ap_strstr_c, which make sure that things are const when
they need to be.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85687 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 19:31:42 +00:00
Greg Stein
02a2200fd8 blast the old names for the status codes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85686 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 17:34:11 +00:00
Greg Stein
1f993fdbb5 http_request.[ch]:
*) add the "install_filter" hook as a hook/control point for modules to
   install their filters. [Ryan Bloom]

http_protocol.c:
*) move check_first_conn_error() up in the file; no actual changes
*) add checked_bputstrs(), checked_bflush(), and checked_bputs(). These are
   copies of ap_rvputs(), ap_rflush(), and ap_rputs() respectively. The
   users of the checked_* functions will be independent of filtering changes
   to the ap_r* functions.
*) add flush_filters() place holder


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85685 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 16:27:47 +00:00
Bill Stoddard
fbb60cf4c3 Properly detect the existance of send_file() on AIX
Submitted by:	Victor Orlikowski
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85674 13f79535-47bb-0310-9956-ffa450edef68
2000-06-23 16:00:29 +00:00
Roy T. Fielding
b17a3d6437 Removed the pointless ap_is_aborted macro.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85626 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 04:22:39 +00:00
Ben Laurie
c0a4cb7873 More consification, correct command initialisation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85599 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 16:29:53 +00:00
Greg Stein
26b5a249bf reduce some code redundancy / simplify.
use a consistent var name for va_list


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85590 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 02:22:03 +00:00
Greg Stein
c7d0508e8a ap_bvputs() is a misnomer; introduce ap_bputstrs()
[todo: proxy and file_cache code should be updated for new name]
add ap_vbputstrs()
use ap_vbputstrs() from http_protocol.
use EOF in a few places, rather than the magic "-1" constant


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85589 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 01:29:29 +00:00
Ryan Bloom
750d8cc03c Protect system header files with the appropriate macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 23:03:05 +00:00
Ryan Bloom
580852da85 Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:47:17 +00:00
Jeff Trawick
f2851fe62b EBCDIC fixes:
getline(): pick up a couple of Martin's changes which were missed when
  the 1.3.x EBCDIC fixes to this funciton were merged into 2.0

  ap_setup_client_block(): fix the logic that, based on the mime type,
  can decide not to translate the request body


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85406 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 02:26:52 +00:00
Jeff Trawick
43c2b45f38 EBCDIC: Rearrange calls to ap_checkconv() so that most handlers
won't need to call it.
Submitted by:	Greg Ames, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85397 13f79535-47bb-0310-9956-ffa450edef68
2000-06-03 22:41:01 +00:00
Jeff Trawick
730cec6b01 APACHE_XLATE, when doing translation that isn't single-byte-only
We must zap the Content-length header (if any).  Otherwise, the
browser will be seriously confused :)  The header is zapped in
ap_set_keepalive() right before we look for Content-length, transfer
encoding, HTTP level, etc. to decide, among other issues, whether or
not to turn on chunked encoding.  For HTTP 1.1, if we don't send
Content-length, we need to use chunked encoding, so we have to zap
the header before that decision.

Interestingly, in Russian Apache the Content-length header is
zapped after ap_set_keepalive() is called, so with HTTP 1.1 they
break the content-length-or-chunked rule.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85379 13f79535-47bb-0310-9956-ffa450edef68
2000-06-02 15:55:20 +00:00
Jeff Trawick
366bc3c630 APACHE_XLATE: in ap_send_error_response(), move the setting
of the translation handle to before we process ErrorDocument
strings.  The previous placement of this logic only handled
the hard-coded response documents.

When ErrorDocument specifies a redirection, we don't get here.
When the error response is headers only, we don't need to set
the handle for content.  Thus, all paths through
ap_send_error_response() should be handled now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85356 13f79535-47bb-0310-9956-ffa450edef68
2000-05-31 01:35:46 +00:00