## ____________________________________________________________________________
##
## Annotated patch file: eapi.patch
-## Copyright (c) 1998-2001 Ralf S. Engelschall, All Rights Reserved.
-## Created on: 18-Jul-2003
+## Copyright (c) 1998-2007 Ralf S. Engelschall, All Rights Reserved.
+## Created on: 12-Sep-2007
##
## This file assembles changes to existing Apache source files
## between the original Apache and the patched variant. It can be
| patches and configured the shared memory support via the MM library.
+---------------------------------------------------------------------------
Index: src/Configuration.tmpl
---- src/Configuration.tmpl 28 Jan 2002 19:21:21 -0000 1.1.1.7
-+++ src/Configuration.tmpl 28 Jan 2002 19:40:56 -0000 1.23
+--- src/Configuration.tmpl 11 May 2004 18:28:09 -0000 1.1.1.8
++++ src/Configuration.tmpl 11 May 2004 18:32:15 -0000 1.24
@@ -68,6 +105,24 @@
#TARGET=
| Patch in implementation of the EAPI rule.
+---------------------------------------------------------------------------
Index: src/Configure
---- src/Configure 18 Jul 2003 15:44:29 -0000 1.1.1.21
-+++ src/Configure 18 Jul 2003 15:56:57 -0000 1.24
-@@ -1892,6 +1892,72 @@
+--- src/Configure 10 Sep 2007 20:30:32 -0000 1.1.1.30
++++ src/Configure 10 Sep 2007 20:33:10 -0000 1.33
+@@ -1868,6 +1868,72 @@
fi
####################################################################
| Add the build support for the ap_hook.c and ap_ctx.c sources (Win32)
+---------------------------------------------------------------------------
Index: src/ap/ap.mak
---- src/ap/ap.mak 18 Jul 2003 15:44:30 -0000 1.1.1.10
-+++ src/ap/ap.mak 18 Jul 2003 15:56:58 -0000 1.10
+--- src/ap/ap.mak 18 Oct 2005 06:26:22 -0000 1.1.1.11
++++ src/ap/ap.mak 18 Oct 2005 06:27:34 -0000 1.11
@@ -44,6 +44,9 @@
-@erase "$(INTDIR)\ap_cpystrn.obj"
-@erase "$(INTDIR)\ap_fnmatch.obj"
| EAPI-aware modules and standard modules.
+---------------------------------------------------------------------------
Index: src/include/ap_mmn.h
---- src/include/ap_mmn.h 18 Jul 2003 15:44:32 -0000 1.1.1.12
-+++ src/include/ap_mmn.h 18 Jul 2003 15:56:58 -0000 1.12
-@@ -245,7 +245,23 @@
- * 19990320.15 - ap_is_recursion_limit_exceeded()
+--- src/include/ap_mmn.h 28 Jul 2006 13:55:31 -0000 1.1.1.15
++++ src/include/ap_mmn.h 28 Jul 2006 13:56:29 -0000 1.15
+@@ -207,7 +207,23 @@
+ * 19990320.18 - trace_enable member added to core server_config
*/
+/*
| shared memory pools.
+---------------------------------------------------------------------------
Index: src/include/ap_alloc.h
---- src/include/ap_alloc.h 18 Jul 2003 15:44:31 -0000 1.1.1.6
-+++ src/include/ap_alloc.h 18 Jul 2003 15:56:58 -0000 1.7
-@@ -95,6 +95,15 @@
+--- src/include/ap_alloc.h 28 Jul 2006 13:55:32 -0000 1.1.1.9
++++ src/include/ap_alloc.h 28 Jul 2006 13:56:29 -0000 1.10
+@@ -53,6 +53,15 @@
API_EXPORT(pool *) ap_init_alloc(void); /* Set up everything */
void ap_cleanup_alloc(void);
API_EXPORT(pool *) ap_make_sub_pool(pool *); /* All pools are subpools of permanent_pool */
| Add the additional context variable `ctx' for BUFF structures.
+---------------------------------------------------------------------------
Index: src/include/buff.h
---- src/include/buff.h 18 Jul 2003 15:44:32 -0000 1.1.1.7
-+++ src/include/buff.h 18 Jul 2003 15:56:58 -0000 1.11
-@@ -125,6 +125,10 @@
+--- src/include/buff.h 28 Jul 2006 13:55:31 -0000 1.1.1.9
++++ src/include/buff.h 28 Jul 2006 13:56:29 -0000 1.13
+@@ -83,6 +83,10 @@
/* transport handle, for RPC binding handle or some such */
void *t_handle;
#ifdef B_SFIO
Sfio_t *sf_in;
Sfio_t *sf_out;
-@@ -180,6 +184,10 @@
- /* Internal routines */
+@@ -139,6 +143,10 @@
API_EXPORT(int) ap_bflsbuf(int c, BUFF *fb);
API_EXPORT(int) ap_bfilbuf(BUFF *fb);
-+
+
+#ifdef EAPI
+#define ap_bpeekc(fb) ( ((fb)->incnt == 0) ? EOF : *((fb)->inptr) )
+#endif
-
++
#ifndef CHARSET_EBCDIC
+ #define ap_bgetc(fb) ( ((fb)->incnt == 0) ? ap_bfilbuf(fb) : \
+---------------------------------------------------------------------------
| Add the four additional Apache API module hooks.
+---------------------------------------------------------------------------
Index: src/include/http_config.h
---- src/include/http_config.h 18 Jul 2003 15:44:32 -0000 1.1.1.11
-+++ src/include/http_config.h 18 Jul 2003 15:56:58 -0000 1.13
-@@ -276,6 +276,65 @@
+--- src/include/http_config.h 28 Jul 2006 13:55:31 -0000 1.1.1.15
++++ src/include/http_config.h 28 Jul 2006 13:56:29 -0000 1.17
+@@ -234,6 +234,65 @@
void (*child_exit) (server_rec *, pool *);
#endif
int (*post_read_request) (request_rec *);
| global module context.
+---------------------------------------------------------------------------
Index: src/include/http_conf_globals.h
---- src/include/http_conf_globals.h 18 Jul 2003 15:44:32 -0000 1.1.1.13
-+++ src/include/http_conf_globals.h 18 Jul 2003 15:56:58 -0000 1.14
-@@ -95,6 +95,9 @@
+--- src/include/http_conf_globals.h 28 Jul 2006 13:55:30 -0000 1.1.1.15
++++ src/include/http_conf_globals.h 28 Jul 2006 13:56:29 -0000 1.16
+@@ -53,6 +53,9 @@
#endif
extern int ap_dump_settings;
extern API_VAR_EXPORT int ap_extended_status;
extern API_VAR_EXPORT char *ap_pid_fname;
extern API_VAR_EXPORT char *ap_scoreboard_fname;
-+---------------------------------------------------------------------------
-| Export the ap_set_callback_and_alarm() function because this
-| first is a useful thing and second we need it because all
-| other API/timeout functions deal with a request_rec while
-| some modules need a generic timeout mechanism.
-+---------------------------------------------------------------------------
-Index: src/include/http_main.h
-
+---------------------------------------------------------------------------
| First add support for the HTTPS protocol scheme via hooks,
| second add the additional context variable `ctx' for the
| function.
+---------------------------------------------------------------------------
Index: src/include/httpd.h
---- src/include/httpd.h 18 Jul 2003 15:44:32 -0000 1.1.1.21
-+++ src/include/httpd.h 18 Jul 2003 15:56:58 -0000 1.31
-@@ -70,7 +70,19 @@
+--- src/include/httpd.h 10 Sep 2007 20:30:33 -0000 1.1.1.30
++++ src/include/httpd.h 10 Sep 2007 20:33:10 -0000 1.40
+@@ -28,7 +28,19 @@
/* Headers in which EVERYONE has an interest... */
#include "ap_config.h"
#include "buff.h"
#include "ap.h"
-@@ -145,8 +157,13 @@
+@@ -103,8 +115,13 @@
#define ap_http_method(r) ap_os_http_method((void*)r)
#define ap_default_port(r) ap_os_default_port((void*)r)
#else
#endif
/* --------- Default user name and group name running standalone ---------- */
-@@ -352,6 +369,19 @@
+@@ -313,6 +330,19 @@
#define SCOREBOARD_MAINTENANCE_INTERVAL 1000000
#endif
/* Number of requests to try to handle in a single process. If <= 0,
* the children don't die off. That's the default here, since I'm still
* interested in finding and stanching leaks.
-@@ -444,6 +474,9 @@
+@@ -405,6 +435,9 @@
API_EXPORT(const char *) ap_get_server_version(void);
API_EXPORT(void) ap_add_version_component(const char *component);
API_EXPORT(const char *) ap_get_server_built(void);
/* Numeric release version identifier: MMNNFFRBB: major minor fix final beta
* Always increases along the same track as the source branch.
-@@ -847,6 +880,10 @@
+@@ -808,6 +841,10 @@
* record to improve 64bit alignment the next time we need to break
* binary compatibility for some other reason.
*/
};
-@@ -895,6 +932,9 @@
+@@ -856,6 +893,9 @@
char *local_host; /* used for ap_get_server_name when
* UseCanonicalName is set to DNS
* (ignores setting of HostnameLookups) */
};
/* Per-vhost config... */
-@@ -967,6 +1007,10 @@
+@@ -928,6 +968,10 @@
int limit_req_line; /* limit on size of the HTTP request line */
int limit_req_fieldsize; /* limit on size of any request header field */
int limit_req_fields; /* limit on number of request header fields */
| Patch the shared memory pool support into the Apache pool facility.
+---------------------------------------------------------------------------
Index: src/main/alloc.c
---- src/main/alloc.c 18 Jul 2003 15:44:34 -0000 1.1.1.14
-+++ src/main/alloc.c 18 Jul 2003 15:56:58 -0000 1.22
-@@ -64,6 +64,10 @@
+--- src/main/alloc.c 28 Jul 2006 13:55:33 -0000 1.1.1.18
++++ src/main/alloc.c 28 Jul 2006 13:56:29 -0000 1.27
+@@ -22,6 +22,10 @@
*/
#include "httpd.h"
#include "multithread.h"
#include "http_log.h"
-@@ -138,6 +142,10 @@
+@@ -96,6 +100,10 @@
#define BLOCK_MINALLOC 0
#endif
/*****************************************************************
*
* Managing free storage blocks...
-@@ -166,6 +174,9 @@
+@@ -124,6 +132,9 @@
char *endp;
union block_hdr *next;
char *first_avail;
#ifdef POOL_DEBUG
union block_hdr *global_next;
struct pool *owning_pool;
-@@ -216,7 +227,11 @@
+@@ -174,7 +185,11 @@
/* Get a completely new block from the system pool. Note that we rely on
malloc() to provide aligned memory. */
{
union block_hdr *blok;
int request_size;
-@@ -232,6 +247,11 @@
+@@ -190,6 +205,11 @@
num_malloc_bytes += size + sizeof(union block_hdr);
#endif
request_size = size + sizeof(union block_hdr);
blok = (union block_hdr *) malloc(request_size);
if (blok == NULL) {
fprintf(stderr, "Ouch! malloc(%d) failed in malloc_block()\n",
-@@ -239,6 +259,9 @@
+@@ -197,6 +217,9 @@
exit(1);
}
debug_fill(blok, size + sizeof(union block_hdr));
blok->h.next = NULL;
blok->h.first_avail = (char *) (blok + 1);
blok->h.endp = size + blok->h.first_avail;
-@@ -299,6 +322,10 @@
+@@ -257,6 +280,10 @@
if (blok == NULL)
return; /* Sanity check --- freeing empty pool? */
(void) ap_acquire_mutex(alloc_mutex);
old_free_list = block_freelist;
block_freelist = blok;
-@@ -345,6 +372,10 @@
+@@ -303,6 +330,10 @@
#endif
(void) ap_release_mutex(alloc_mutex);
#endif
}
-@@ -353,7 +384,11 @@
+@@ -311,7 +342,11 @@
* if necessary. Must be called with alarms blocked.
*/
{
union block_hdr **lastptr = &block_freelist;
union block_hdr *blok = block_freelist;
-@@ -363,7 +398,12 @@
+@@ -321,7 +356,12 @@
*/
while (blok != NULL) {
*lastptr = blok->h.next;
blok->h.next = NULL;
debug_verify_filled(blok->h.first_avail, blok->h.endp,
-@@ -379,7 +419,11 @@
+@@ -337,7 +377,11 @@
/* Nope. */
min_size += BLOCK_MINFREE;
return blok;
}
-@@ -429,6 +473,9 @@
+@@ -387,6 +431,9 @@
#ifdef POOL_DEBUG
struct pool *joined;
#endif
};
static pool *permanent_pool;
-@@ -443,16 +490,28 @@
+@@ -401,16 +448,28 @@
#define POOL_HDR_CLICKS (1 + ((sizeof(struct pool) - 1) / CLICK_SZ))
#define POOL_HDR_BYTES (POOL_HDR_CLICKS * CLICK_SZ)
new_pool = (pool *) blok->h.first_avail;
blok->h.first_avail += POOL_HDR_BYTES;
#ifdef POOL_DEBUG
-@@ -471,12 +530,38 @@
+@@ -429,12 +488,38 @@
p->sub_pools = new_pool;
}
#ifdef POOL_DEBUG
static void stack_var_init(char *s)
{
-@@ -491,6 +576,13 @@
+@@ -449,6 +534,13 @@
}
#endif
#ifdef ALLOC_STATS
static void dump_stats(void)
{
-@@ -523,6 +615,58 @@
+@@ -481,6 +573,58 @@
return permanent_pool;
}
void ap_cleanup_alloc(void)
{
ap_destroy_mutex(alloc_mutex);
-@@ -533,10 +677,18 @@
+@@ -491,10 +635,18 @@
{
ap_block_alarms();
/* Don't hold the mutex during cleanups. */
run_cleanups(a->cleanups);
a->cleanups = NULL;
-@@ -570,6 +722,10 @@
+@@ -528,6 +680,10 @@
ap_block_alarms();
ap_clear_pool(a);
(void) ap_acquire_mutex(alloc_mutex);
if (a->parent) {
if (a->parent->sub_pools == a)
-@@ -580,6 +736,10 @@
+@@ -538,6 +694,10 @@
a->sub_next->sub_prev = a->sub_prev;
}
(void) ap_release_mutex(alloc_mutex);
free_blocks(a->first);
ap_unblock_alarms();
-@@ -594,6 +754,30 @@
+@@ -552,6 +712,30 @@
return bytes_in_block_list(block_freelist);
}
/*****************************************************************
* POOL_DEBUG support
*/
-@@ -759,16 +943,31 @@
+@@ -717,16 +901,31 @@
ap_block_alarms();
ap_unblock_alarms();
-@@ -885,6 +1084,11 @@
+@@ -843,6 +1042,11 @@
size = cur_len << 1;
if (size < AP_PSPRINTF_MIN_SIZE)
size = AP_PSPRINTF_MIN_SIZE;
ptr = realloc(ps->base, size);
if (ptr == NULL) {
fputs("Ouch! Out of memory!\n", stderr);
-@@ -908,9 +1112,21 @@
+@@ -866,9 +1070,21 @@
size = AP_PSPRINTF_MIN_SIZE;
/* must try another blok */
memcpy(nblok->h.first_avail, blok->h.first_avail, cur_len);
ps->vbuff.curpos = nblok->h.first_avail + cur_len;
/* save a byte for the NUL terminator */
-@@ -919,10 +1135,18 @@
+@@ -877,10 +1093,18 @@
/* did we allocate the current blok? if so free it up */
if (ps->got_a_new_block) {
debug_fill(blok->h.first_avail, blok->h.endp - blok->h.first_avail);
}
ps->blok = nblok;
ps->got_a_new_block = 1;
-@@ -941,6 +1165,11 @@
+@@ -899,6 +1123,11 @@
void *ptr;
ap_block_alarms();
ps.base = malloc(512);
if (ps.base == NULL) {
fputs("Ouch! Out of memory!\n", stderr);
-@@ -953,6 +1182,11 @@
+@@ -911,6 +1140,11 @@
*ps.vbuff.curpos++ = '\0';
ptr = ps.base;
/* shrink */
ptr = realloc(ptr, (char *)ps.vbuff.curpos - (char *)ptr);
if (ptr == NULL) {
fputs("Ouch! Out of memory!\n", stderr);
-@@ -1780,6 +2014,9 @@
- cleanup_pool_for_exec(permanent_pool);
- ap_unblock_alarms();
- #endif /* ndef WIN32 */
-+#ifdef EAPI
-+ ap_kill_alloc_shared();
-+#endif
- }
-
- API_EXPORT_NONSTD(void) ap_null_cleanup(void *data)
+---------------------------------------------------------------------------
| Patch the low-level buffer routines to additionally allow
| modules to intercept the I/O processing via hooks.
+---------------------------------------------------------------------------
Index: src/main/buff.c
---- src/main/buff.c 18 Jul 2003 15:44:34 -0000 1.1.1.13
-+++ src/main/buff.c 18 Jul 2003 15:56:58 -0000 1.21
-@@ -293,6 +293,9 @@
+--- src/main/buff.c 28 Jul 2006 13:55:34 -0000 1.1.1.17
++++ src/main/buff.c 28 Jul 2006 13:56:29 -0000 1.25
+@@ -251,6 +251,9 @@
}
else
#endif
rv = read(fb->fd_in, buf, nbyte);
return rv;
-@@ -304,6 +307,9 @@
+@@ -262,6 +265,9 @@
#if defined (WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK)
if (fb->flags & B_SOCKET) {
rv = ap_recvwithtimeout(fb->fd_in, buf, nbyte, 0);
if (rv == SOCKET_ERROR)
errno = WSAGetLastError();
-@@ -351,6 +357,9 @@
+@@ -312,6 +318,9 @@
}
else
#endif
#if defined (B_SFIO)
rv = sfwrite(fb->sf_out, buf, nbyte);
#else
-@@ -381,6 +390,9 @@
+@@ -342,6 +351,9 @@
#if defined(WIN32) || defined(NETWARE)
if (fb->flags & B_SOCKET) {
rv = ap_sendwithtimeout(fb->fd, buf, nbyte, 0);
if (rv == SOCKET_ERROR)
errno = WSAGetLastError();
-@@ -464,6 +476,10 @@
+@@ -425,6 +437,10 @@
fb->callback_data = NULL;
fb->filter_callback = NULL;
return fb;
}
-@@ -1116,6 +1132,9 @@
+@@ -1077,6 +1093,9 @@
i = 0;
while (i < nvec) {
do
| variables are initialized.
+---------------------------------------------------------------------------
Index: src/main/http_config.c
---- src/main/http_config.c 18 Jul 2003 15:44:34 -0000 1.1.1.16
-+++ src/main/http_config.c 18 Jul 2003 15:56:58 -0000 1.19
-@@ -600,6 +600,20 @@
+--- src/main/http_config.c 28 Jul 2006 13:55:33 -0000 1.1.1.21
++++ src/main/http_config.c 28 Jul 2006 13:56:29 -0000 1.24
+@@ -558,6 +558,20 @@
m->name = tmp;
}
#endif /*_OSD_POSIX*/
}
/*
-@@ -614,6 +628,21 @@
+@@ -572,6 +586,21 @@
{
module *modp;
modp = top_module;
if (modp == m) {
/* We are the top module, special case */
-@@ -1007,6 +1036,27 @@
+@@ -965,6 +994,27 @@
const command_rec *cmd;
module *mod = top_module;
if ((l[0] == '#') || (!l[0]))
return NULL;
-@@ -1467,6 +1517,10 @@
+@@ -1429,6 +1479,10 @@
s->limit_req_fieldsize = main_server->limit_req_fieldsize;
s->limit_req_fields = main_server->limit_req_fields;
*ps = s;
return ap_parse_vhost_addrs(p, hostname, s);
-@@ -1577,6 +1631,10 @@
-
+@@ -1540,6 +1594,10 @@
s->module_config = create_server_config(p, s);
s->lookup_defaults = create_default_per_dir_config(p);
-+
+
+#ifdef EAPI
+ s->ctx = ap_ctx_new(p);
+#endif /* EAPI */
-
++
return s;
}
+
+---------------------------------------------------------------------------
| Add the ap_global_ctx variable and the new
| is added plus the initialization of one more `ctx' variable.
+---------------------------------------------------------------------------
Index: src/main/http_main.c
---- src/main/http_main.c 18 Jul 2003 15:44:35 -0000 1.1.1.20
-+++ src/main/http_main.c 18 Jul 2003 15:56:58 -0000 1.42
-@@ -279,6 +279,9 @@
+--- src/main/http_main.c 10 Sep 2007 20:30:35 -0000 1.1.1.27
++++ src/main/http_main.c 10 Sep 2007 20:33:10 -0000 1.50
+@@ -243,6 +243,9 @@
int ap_dump_settings = 0;
API_VAR_EXPORT int ap_extended_status = 0;
#ifndef NETWARE
static APACHE_TLS int volatile exit_after_unblock = 0;
#endif
-@@ -1577,6 +1604,10 @@
- ap_log_transaction(log_req);
+@@ -1586,6 +1613,9 @@
}
+ ap_bsetflag(save_req->connection->client, B_EOUT, 1);
+#ifdef EAPI
+ ap_call_close_connection_hook(save_req->connection);
+#endif /* EAPI */
-+
- ap_bsetflag(save_req->connection->client, B_EOUT, 1);
ap_bclose(save_req->connection->client);
-@@ -1585,6 +1616,9 @@
- ap_longjmp(jmpbuffer, 1);
+ if (!ap_standalone)
+@@ -1594,6 +1624,9 @@
}
else { /* abort the connection */
+ ap_bsetflag(current_conn->client, B_EOUT, 1);
+#ifdef EAPI
+ ap_call_close_connection_hook(current_conn);
+#endif /* EAPI */
- ap_bsetflag(current_conn->client, B_EOUT, 1);
ap_bclose(current_conn->client);
current_conn->aborted = 1;
-@@ -1887,10 +1921,16 @@
+ }
+@@ -1915,10 +1948,16 @@
/* Send any leftover data to the client, but never try to again */
if (ap_bflush(r->connection->client) == -1) {
ap_bsetflag(r->connection->client, B_EOUT, 1);
/* Close our half of the connection --- send the client a FIN */
-@@ -2589,6 +2629,9 @@
+@@ -2617,6 +2656,9 @@
/* Clear the pool - including any registered cleanups */
ap_destroy_pool(pglobal);
#endif
exit(code);
}
-@@ -3608,6 +3651,24 @@
+@@ -3711,6 +3753,24 @@
conn->remote_addr = *remaddr;
conn->remote_ip = ap_pstrdup(conn->pool,
inet_ntoa(conn->remote_addr.sin_addr));
return conn;
}
-@@ -4043,6 +4104,15 @@
+@@ -4221,6 +4281,15 @@
printf("Server's Module Magic Number: %u:%u\n",
MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
printf("Server compiled with....\n");
#ifdef TPF
show_os_specific_compile_settings();
#endif
-@@ -4214,6 +4284,22 @@
- ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *));
+@@ -4396,6 +4465,22 @@
ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
+ pid_table = ap_make_table(pglobal, HARD_SERVER_LIMIT);
+
+#ifdef EAPI
+ ap_hook_init();
}
#ifndef MULTITHREAD
-@@ -4675,6 +4761,9 @@
+@@ -4892,6 +4977,9 @@
ap_sync_scoreboard_image();
if (ap_scoreboard_image->global.running_generation != ap_my_generation) {
ap_bclose(conn_io);
clean_child_exit(0);
}
-@@ -4703,6 +4792,9 @@
+@@ -4920,6 +5008,9 @@
*/
#ifdef NO_LINGCLOSE
ap_bclose(conn_io); /* just close it */
#else
if (r && r->connection
-@@ -4713,6 +4805,9 @@
+@@ -4930,6 +5021,9 @@
lingering_close(r);
}
else {
ap_bsetflag(conn_io, B_EOUT, 1);
ap_bclose(conn_io);
}
-@@ -5483,16 +5578,31 @@
+@@ -5730,16 +5824,31 @@
usage(argv[0]);
}
}
}
child_timeouts = !ap_standalone || one_process;
-@@ -5640,6 +5750,10 @@
+@@ -5887,6 +5996,10 @@
ap_destroy_pool(r->pool);
}
ap_bclose(cio);
}
exit(0);
-@@ -6016,6 +6130,9 @@
+@@ -6263,6 +6376,9 @@
ap_kill_cleanups_for_socket(ptrans, csd);
#ifdef NO_LINGCLOSE
ap_bclose(conn_io); /* just close it */
#else
if (r && r->connection
-@@ -6026,6 +6143,9 @@
+@@ -6273,6 +6389,9 @@
lingering_close(r);
}
else {
ap_bsetflag(conn_io, B_EOUT, 1);
ap_bclose(conn_io);
}
-@@ -7594,6 +7714,10 @@
+@@ -7848,6 +7967,10 @@
if (!conf_specified)
ap_cpystrn(ap_server_confname, SERVER_CONFIG_FILE, sizeof(ap_server_confname));
if (!ap_os_is_path_absolute(ap_server_confname))
ap_cpystrn(ap_server_confname,
ap_server_root_relative(pcommands, ap_server_confname),
-@@ -7633,6 +7757,9 @@
- }
+@@ -7888,6 +8011,9 @@
#else /* ndef WIN32 */
server_conf = ap_read_config(pconf, ptrans, ap_server_confname);
-+#endif
+ #endif
+#ifdef EAPI
+ ap_init_alloc_shared(FALSE);
- #endif
++#endif
if (ap_configtestonly) {
+ fprintf(stderr, "%s: Syntax OK\n", ap_server_root_relative(pcommands, ap_server_confname));
+---------------------------------------------------------------------------
| Just add the initialization of the `ctx' variable for
| conn_rec structures.
+---------------------------------------------------------------------------
Index: src/main/http_request.c
---- src/main/http_request.c 18 Jul 2003 15:44:36 -0000 1.1.1.16
-+++ src/main/http_request.c 18 Jul 2003 15:56:58 -0000 1.16
-@@ -1398,6 +1398,10 @@
+--- src/main/http_request.c 28 Jul 2006 13:55:34 -0000 1.1.1.20
++++ src/main/http_request.c 28 Jul 2006 13:56:29 -0000 1.20
+@@ -1373,6 +1373,10 @@
new->method = r->method;
new->method_number = r->method_number;
| request_rec structures.
+---------------------------------------------------------------------------
Index: src/main/http_protocol.c
---- src/main/http_protocol.c 18 Jul 2003 15:44:35 -0000 1.1.1.19
-+++ src/main/http_protocol.c 18 Jul 2003 15:56:58 -0000 1.19
-@@ -1202,6 +1202,10 @@
+--- src/main/http_protocol.c 28 Jul 2006 13:55:34 -0000 1.1.1.24
++++ src/main/http_protocol.c 28 Jul 2006 13:56:29 -0000 1.24
+@@ -1173,6 +1173,10 @@
r->status = HTTP_REQUEST_TIME_OUT; /* Until we get a request */
r->the_request = NULL;
#ifdef CHARSET_EBCDIC
ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, r->ebcdic.conv_in = 1);
ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
-@@ -1358,6 +1362,11 @@
+@@ -1341,6 +1345,11 @@
rnew->read_body = REQUEST_NO_BODY;
rnew->main = (request_rec *) r;
| Add support for loading both EAPI and AP13 modules.
+---------------------------------------------------------------------------
Index: src/modules/standard/mod_so.c
---- src/modules/standard/mod_so.c 18 Jul 2003 15:44:39 -0000 1.1.1.10
-+++ src/modules/standard/mod_so.c 18 Jul 2003 15:56:59 -0000 1.11
-@@ -269,11 +269,24 @@
+--- src/modules/standard/mod_so.c 28 Jul 2006 13:55:28 -0000 1.1.1.13
++++ src/modules/standard/mod_so.c 28 Jul 2006 13:56:29 -0000 1.14
+@@ -267,11 +267,24 @@
* Make sure the found module structure is really a module structure
*
*/
| one hook for creating new %x tags at all.
+---------------------------------------------------------------------------
Index: src/modules/standard/mod_log_config.c
---- src/modules/standard/mod_log_config.c 18 Jul 2003 15:44:39 -0000 1.1.1.14
-+++ src/modules/standard/mod_log_config.c 18 Jul 2003 15:56:59 -0000 1.27
-@@ -262,6 +262,9 @@
+--- src/modules/standard/mod_log_config.c 28 Jul 2006 13:55:27 -0000 1.1.1.16
++++ src/modules/standard/mod_log_config.c 28 Jul 2006 13:56:29 -0000 1.29
+@@ -221,6 +221,9 @@
typedef const char *(*item_key_func) (request_rec *, char *);
typedef struct {
item_key_func func;
char *arg;
int condition_sense;
-@@ -580,15 +583,36 @@
+@@ -542,15 +545,36 @@
}
};
return NULL;
}
-@@ -714,7 +738,11 @@
+@@ -676,7 +700,11 @@
break;
default:
if (!l) {
char dummy[2];
-@@ -723,6 +751,9 @@
+@@ -685,6 +713,9 @@
return ap_pstrcat(p, "Unrecognized LogFormat directive %",
dummy, NULL);
}
it->func = l->func;
if (it->want_orig == -1) {
it->want_orig = l->want_orig_default;
-@@ -784,6 +815,15 @@
+@@ -746,6 +777,15 @@
/* We do. Do it... */
| variables from other modules.
+---------------------------------------------------------------------------
Index: src/modules/standard/mod_rewrite.c
---- src/modules/standard/mod_rewrite.c 18 Jul 2003 15:44:39 -0000 1.1.1.17
-+++ src/modules/standard/mod_rewrite.c 18 Jul 2003 15:56:59 -0000 1.15
-@@ -3883,6 +3883,15 @@
+--- src/modules/standard/mod_rewrite.c 28 Jul 2006 13:55:29 -0000 1.1.1.22
++++ src/modules/standard/mod_rewrite.c 28 Jul 2006 13:56:29 -0000 1.20
+@@ -3864,6 +3864,15 @@
}
#endif /* ndef WIN32 && NETWARE*/
| the status HTML page.
+---------------------------------------------------------------------------
Index: src/modules/standard/mod_status.c
---- src/modules/standard/mod_status.c 18 Jul 2003 15:44:39 -0000 1.1.1.15
-+++ src/modules/standard/mod_status.c 18 Jul 2003 15:56:59 -0000 1.12
-@@ -694,12 +720,23 @@
- ap_rprintf(r,
- "<td>?<td nowrap>?<td nowrap>..reading.. </tr>\n\n");
- else
-+#ifndef NO_PRETTYPRINT
-+ ap_rprintf(r,
-+ "<td nowrap><font face=\"Arial,Helvetica\" size=\"-1\">%s</font>"
-+ "<td nowrap><font face=\"Arial,Helvetica\" size=\"-1\">%s</font>"
-+ "<td nowrap><font face=\"Arial,Helvetica\" size=\"-1\">%s</font>"
-+ "</tr>\n\n",
-+ score_record.client,
-+ vhost ? vhost->server_hostname : "(unavailable)",
-+ ap_escape_html(r->pool, score_record.request));
-+#else
- ap_rprintf(r,
- "<td>%s<td nowrap>%s<td nowrap>%s</tr>\n\n",
- ap_escape_html(r->pool, score_record.client),
- vhost ? ap_escape_html(r->pool,
- vhost->server_hostname) : "(unavailable)",
- ap_escape_html(r->pool, score_record.request));
-+#endif
- } /* no_table_report */
- } /* !short_report */
- } /* if (<active child>) */
+--- src/modules/standard/mod_status.c 10 Sep 2007 20:30:37 -0000 1.1.1.18
++++ src/modules/standard/mod_status.c 12 Sep 2007 05:32:20 -0000
+@@ -698,6 +735,12 @@
+ #endif
+ }
+
++#ifdef EAPI
++ ap_hook_use("ap::mod_status::display",
++ AP_HOOK_SIG4(void,ptr,int,int), AP_HOOK_ALL,
++ r, no_table_report, short_report);
++#endif
++
+ } else {
+
+ if (!short_report) {
+---------------------------------------------------------------------------
| Add hooks to the scheme processing to allow other modules to
| recognize more schemes by intercepting this processing.
+---------------------------------------------------------------------------
Index: src/modules/proxy/mod_proxy.c
---- src/modules/proxy/mod_proxy.c 18 Jul 2003 15:44:36 -0000 1.1.1.13
-+++ src/modules/proxy/mod_proxy.c 18 Jul 2003 15:56:58 -0000 1.20
-@@ -218,6 +218,9 @@
+--- src/modules/proxy/mod_proxy.c 28 Jul 2006 13:55:25 -0000 1.1.1.16
++++ src/modules/proxy/mod_proxy.c 28 Jul 2006 13:56:29 -0000 1.23
+@@ -177,6 +177,9 @@
static int proxy_fixup(request_rec *r)
{
char *url, *p;
if (r->proxyreq == NOT_PROXY || strncmp(r->filename, "proxy:", 6) != 0)
return DECLINED;
-@@ -225,6 +228,14 @@
+@@ -184,6 +187,14 @@
url = &r->filename[6];
/* canonicalise each specific scheme */
if (strncasecmp(url, "http:", 5) == 0)
return ap_proxy_http_canon(r, url + 5, "http", DEFAULT_HTTP_PORT);
else if (strncasecmp(url, "ftp:", 4) == 0)
-@@ -240,9 +251,44 @@
+@@ -199,9 +210,44 @@
static void proxy_init(server_rec *r, pool *p)
{
ap_proxy_garbage_init(r, p);
/* Send a redirection if the request contains a hostname which is not */
/* fully qualified, i.e. doesn't have a domain name appended. Some proxy */
-@@ -374,6 +420,14 @@
+@@ -365,6 +411,14 @@
* CONNECT is a special method that bypasses the normal proxy
* code.
*/
if (r->method_number == M_CONNECT)
rc = ap_proxy_connect_handler(r, cr, url, ents[i].hostname,
ents[i].port);
-@@ -383,6 +437,9 @@
+@@ -374,6 +428,9 @@
ents[i].port);
else
rc = DECLINED;
/* an error or success */
if (rc != DECLINED && rc != HTTP_BAD_GATEWAY)
-@@ -397,6 +454,14 @@
+@@ -388,6 +445,14 @@
*/
/* handle the scheme */
if (r->method_number == M_CONNECT) {
return ap_proxy_connect_handler(r, cr, url, NULL, 0);
}
-@@ -994,4 +1059,10 @@
+@@ -985,4 +1050,10 @@
NULL, /* child_init */
NULL, /* child_exit */
proxy_detect /* post read-request */
| to enhance it by intercepting this processing.
+---------------------------------------------------------------------------
Index: src/modules/proxy/proxy_http.c
---- src/modules/proxy/proxy_http.c 18 Jul 2003 15:44:37 -0000 1.1.1.16
-+++ src/modules/proxy/proxy_http.c 18 Jul 2003 15:56:58 -0000 1.24
-@@ -170,6 +170,9 @@
+--- src/modules/proxy/proxy_http.c 28 Jul 2006 13:55:25 -0000 1.1.1.20
++++ src/modules/proxy/proxy_http.c 28 Jul 2006 13:56:29 -0000 1.28
+@@ -128,6 +128,9 @@
const char *datestr, *urlstr;
int result, major, minor;
const char *content_length;
void *sconf = r->server->module_config;
proxy_server_conf *conf =
-@@ -191,6 +194,12 @@
+@@ -149,6 +152,12 @@
return HTTP_BAD_REQUEST;
urlptr += 3;
destport = DEFAULT_HTTP_PORT;
strp = strchr(urlptr, '/');
if (strp == NULL) {
desthost = ap_pstrdup(p, urlptr);
-@@ -228,12 +237,18 @@
+@@ -186,12 +195,18 @@
err = ap_proxy_host2addr(proxyhost, &server_hp);
if (err != NULL)
return DECLINED; /* try another */
}
-@@ -308,14 +323,42 @@
+@@ -276,14 +291,42 @@
f = ap_bcreate(p, B_RDWR | B_SOCKET);
ap_bpushfd(f, sock, sock);
| Add EAPI hooks in module structure for APXS generated samples.
+---------------------------------------------------------------------------
Index: src/support/apxs.pl
---- src/support/apxs.pl 18 Jul 2003 15:44:46 -0000 1.1.1.13
-+++ src/support/apxs.pl 18 Jul 2003 15:56:59 -0000 1.13
-@@ -796,5 +796,11 @@
+--- src/support/apxs.pl 28 Jul 2006 13:55:24 -0000 1.1.1.15
++++ src/support/apxs.pl 28 Jul 2006 13:56:29 -0000 1.15
+@@ -753,5 +753,11 @@
NULL, /* child_init */
NULL, /* child_exit */
NULL /* [#0] post read-request */
| and similar braindead platforms as DSO.
+---------------------------------------------------------------------------
Index: src/support/httpd.exp
---- src/support/httpd.exp 18 Jul 2003 15:44:47 -0000 1.1.1.12
-+++ src/support/httpd.exp 18 Jul 2003 15:56:59 -0000 1.14
-@@ -429,3 +429,59 @@
+--- src/support/httpd.exp 11 May 2004 18:28:26 -0000 1.1.1.13
++++ src/support/httpd.exp 11 May 2004 18:32:16 -0000 1.15
+@@ -431,3 +431,59 @@
XML_SetUnparsedEntityDeclHandler
XML_SetUserData
XML_UseParserAsHandlerArg
| Windows 95 and similar braindead platforms as DDL.
+---------------------------------------------------------------------------
Index: src/ApacheCore.def
---- src/ApacheCore.def 19 Jun 2002 07:20:21 -0000 1.1.1.10
-+++ src/ApacheCore.def 19 Jun 2002 07:29:08 -0000 1.14
-@@ -447,3 +447,67 @@
- ap_getline @439
+--- src/ApacheCore.def 11 May 2004 18:28:08 -0000 1.1.1.11
++++ src/ApacheCore.def 11 May 2004 18:32:15 -0000 1.15
+@@ -448,3 +448,67 @@
ap_get_chunk_size @440
ap_escape_logitem @441
+ ap_auth_nonce @442
+
+ ; EAPI extended symbols
+ ; note; no ID's, so these all bind by name rather than ordinal since