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

560 Commits

Author SHA1 Message Date
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
Jeff Trawick
b7685b72c1 Ensure that the proper translation handle (if any) is used when
sending the canned response document to the client.  Otherwise, the
client may get garbage depending on the translation in effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85350 13f79535-47bb-0310-9956-ffa450edef68
2000-05-30 14:20:46 +00:00
William A. Rowe Jr
3f29977506 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out additional linkage argument from DECLARE_HOOK
  and IMPLEMENT_HOOK macros.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85319 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:53:48 +00:00
William A. Rowe Jr
86e2a18f2a This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations.  As with
  the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
  and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

  I will be happy to revert the inclusion of ap_config.h from 
  httpd.h if this bothers anyone.  More individual modules need
  to be patched if we do so.

  The API_EXPORTs all moved into central storage in the ap_config.h
  header.  Without WIN32 or API_STATIC compile time declarations, 
  these macros remain no-ops.

  This patch also moves the following data from http_main to http_config:

    const char *ap_server_argv0;
    const char *ap_server_root;
    ap_array_header_t *ap_server_pre_read_config;
    ap_array_header_t *ap_server_post_read_config;
    ap_array_header_t *ap_server_config_defines;

  And the following variables had already moved into ap_hooks.c:

    ap_pool_t *g_pHookPool;  (initialized now in http_config)
    int g_bDebugHooks;                   (out of http_config)
    const char *g_szCurrentHookName;     (out of http_config)

  The changes to http_main.c are in preparation for that module to
  move out to a seperate .exe for win32.  Other platforms will be
  unaffected, outside of these changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:28:02 +00:00
Jeff Trawick
78aba7227f APACHE_XLATE, CHARSET_EBCDIC stuff:
Provide new function ap_set_content_xlate() to simplify what needs
to be done to set up translation of content.  Use it where appropriate.

With this change, EBCDIC logic was tweaked so that ap_checkconv() does
not overlay a translation handle previously stored (e.g., by a module)
unless it is turning translation off.  Unless ap_checkconv() determines
that translation is inappropriate, it should leave the translation handle
alone.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85296 13f79535-47bb-0310-9956-ffa450edef68
2000-05-25 20:51:25 +00:00
Ryan Bloom
9c112e7c72 Implement saferead in Apache 2.0. This has had minimal testing, and it
seems to work, but only really hammering on it will tell for sure.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85289 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 19:19:20 +00:00
Jeff Trawick
d83c61bf73 include translation information in the request_rec;
finish converting ap_bsetflag(B_ASCII2EBCDIC or B_EBCDIC2ASCII) to
ap_bsetopt(BO_WXLATE or BO_RXLATE)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85238 13f79535-47bb-0310-9956-ffa450edef68
2000-05-17 03:19:38 +00:00
Jeff Trawick
34ecfec8d0 Pick up various EBCDIC fixes from 1.3 (from Martin Kraemer and Oliver
Reh originally according to the change log).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85176 13f79535-47bb-0310-9956-ffa450edef68
2000-05-10 19:07:43 +00:00
Doug MacEachern
6644b34387 add AP_ prefix to *HOOK* macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85045 13f79535-47bb-0310-9956-ffa450edef68
2000-04-26 07:14:39 +00:00
Jeff Trawick
3548f16478 Fix some problems on systems where EAGAIN != EWOULDBLOCK (e.g., OS/390).
ap_canonical_errror() for Unix now maps EWOULDBLOCK to EAGAIN/APR_EAGAIN
when appropriate so that the changes here (as well as bjh's changes from a
few days ago) to call ap_canonical_error() before comparing with EWOULDBLOCK
will work on Unix as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85019 13f79535-47bb-0310-9956-ffa450edef68
2000-04-23 13:22:08 +00:00
Brian Havard
af789a8fd6 Another required ap_canonical_error().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85001 13f79535-47bb-0310-9956-ffa450edef68
2000-04-20 16:08:07 +00:00
Jeff Trawick
cc6e027c47 [EBCDIC] Port Paul Gilmartin's CRLF patch from 1.3. This replaces most
of the \015, \012, and \015\012 constants with macros.
Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84998 13f79535-47bb-0310-9956-ffa450edef68
2000-04-20 14:36:01 +00:00
Bill Stoddard
3f836c5723 Allow for the possibility of receiving data regardless of the pipe
error condition or receiving EOF on the pipe read. This patch
assumes that a read returning APR_SUCCESS with 0 bytes read is equivalent
to an EOF.

Submitted by:	Dean Gaudet
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84965 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 17:38:14 +00:00
Ryan Bloom
de3a77dc01 Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84963 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 15:59:20 +00:00