##
## Annotated patch file: eapi.patch
## Copyright (c) 1998-2001 Ralf S. Engelschall, All Rights Reserved.
-## Created on: 27-Mar-2002
+## Created on: 19-Jun-2002
##
## This file assembles changes to existing Apache source files
## between the original Apache and the patched variant. It can be
| Patch in implementation of the EAPI rule.
+---------------------------------------------------------------------------
Index: src/Configure
---- src/Configure 27 Mar 2002 15:22:54 -0000 1.1.1.18
-+++ src/Configure 27 Mar 2002 15:30:02 -0000 1.21
-@@ -1866,6 +1866,72 @@
+--- src/Configure 19 Jun 2002 07:20:22 -0000 1.1.1.19
++++ src/Configure 19 Jun 2002 07:29:08 -0000 1.22
+@@ -1869,6 +1869,72 @@
fi
####################################################################
| Add the build support for the ap_hook.c and ap_ctx.c sources (Unix)
+---------------------------------------------------------------------------
Index: src/ap/Makefile.tmpl
---- src/ap/Makefile.tmpl 20 May 2001 08:16:15 -0000 1.1.1.7
-+++ src/ap/Makefile.tmpl 20 May 2001 08:23:01 -0000 1.7
-@@ -6,8 +6,8 @@
- LIB=libap.a
+--- src/ap/Makefile.tmpl 19 Jun 2002 07:20:22 -0000 1.1.1.8
++++ src/ap/Makefile.tmpl 19 Jun 2002 07:29:08 -0000 1.8
+@@ -7,7 +7,7 @@
OBJS=ap_cpystrn.o ap_execve.o ap_fnmatch.o ap_getpass.o ap_md5c.o ap_signal.o \
ap_slack.o ap_snprintf.o ap_sha1.o ap_checkpass.o ap_base64.o ap_ebcdic.o \
| EAPI-aware modules and standard modules.
+---------------------------------------------------------------------------
Index: src/include/ap_mmn.h
---- src/include/ap_mmn.h 27 Mar 2002 15:22:57 -0000 1.1.1.10
-+++ src/include/ap_mmn.h 27 Mar 2002 15:30:02 -0000 1.10
-@@ -237,7 +237,23 @@
- * structure
+--- src/include/ap_mmn.h 19 Jun 2002 07:20:24 -0000 1.1.1.11
++++ src/include/ap_mmn.h 19 Jun 2002 07:29:08 -0000 1.11
+@@ -239,7 +239,23 @@
+ * 19990320.13 - add ap_strtol()
*/
+/*
| function.
+---------------------------------------------------------------------------
Index: src/include/httpd.h
---- src/include/httpd.h 27 Mar 2002 15:22:59 -0000 1.1.1.18
-+++ src/include/httpd.h 27 Mar 2002 15:30:02 -0000 1.28
+--- src/include/httpd.h 19 Jun 2002 07:20:24 -0000 1.1.1.19
++++ src/include/httpd.h 19 Jun 2002 07:29:08 -0000 1.29
@@ -70,7 +70,19 @@
/* Headers in which EVERYONE has an interest... */
/* --------- Default user name and group name running standalone ---------- */
/* --- These may be specified as numbers by placing a # before a number --- */
-@@ -360,6 +377,19 @@
+@@ -351,6 +368,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.
-@@ -452,6 +482,9 @@
+@@ -443,6 +473,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.
-@@ -855,6 +888,10 @@
+@@ -846,6 +879,10 @@
* record to improve 64bit alignment the next time we need to break
* binary compatibility for some other reason.
*/
};
-@@ -903,6 +940,9 @@
+@@ -894,6 +931,9 @@
char *local_host; /* used for ap_get_server_name when
* UseCanonicalName is set to DNS
* (ignores setting of HostnameLookups) */
};
/* Per-vhost config... */
-@@ -975,6 +1015,10 @@
+@@ -966,6 +1006,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 */
| is added plus the initialization of one more `ctx' variable.
+---------------------------------------------------------------------------
Index: src/main/http_main.c
---- src/main/http_main.c 27 Mar 2002 15:23:01 -0000 1.1.1.17
-+++ src/main/http_main.c 27 Mar 2002 15:30:02 -0000 1.39
+--- src/main/http_main.c 19 Jun 2002 07:20:25 -0000 1.1.1.18
++++ src/main/http_main.c 19 Jun 2002 07:29:08 -0000 1.40
@@ -279,6 +279,9 @@
int ap_dump_settings = 0;
/*
* The max child slot ever assigned, preserved across restarts. Necessary
-@@ -461,6 +464,30 @@
+@@ -463,6 +466,30 @@
}
}
#ifndef NETWARE
static APACHE_TLS int volatile exit_after_unblock = 0;
#endif
-@@ -1513,6 +1540,10 @@
+@@ -1518,6 +1545,10 @@
ap_log_transaction(log_req);
}
ap_bsetflag(save_req->connection->client, B_EOUT, 1);
ap_bclose(save_req->connection->client);
-@@ -1521,6 +1552,9 @@
+@@ -1526,6 +1557,9 @@
ap_longjmp(jmpbuffer, 1);
}
else { /* abort the connection */
ap_bsetflag(current_conn->client, B_EOUT, 1);
ap_bclose(current_conn->client);
current_conn->aborted = 1;
-@@ -1823,10 +1857,16 @@
+@@ -1828,10 +1862,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 */
-@@ -2554,6 +2594,9 @@
+@@ -2559,6 +2599,9 @@
/* Clear the pool - including any registered cleanups */
ap_destroy_pool(pglobal);
#endif
exit(code);
}
-@@ -3549,6 +3592,24 @@
+@@ -3570,6 +3613,24 @@
conn->remote_addr = *remaddr;
conn->remote_ip = ap_pstrdup(conn->pool,
inet_ntoa(conn->remote_addr.sin_addr));
return conn;
}
-@@ -3977,6 +4038,15 @@
+@@ -3998,6 +4059,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
-@@ -4149,6 +4219,22 @@
+@@ -4167,6 +4237,22 @@
ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *));
ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
}
#ifndef MULTITHREAD
-@@ -4592,6 +4678,9 @@
+@@ -4617,6 +4703,9 @@
ap_sync_scoreboard_image();
if (ap_scoreboard_image->global.running_generation != ap_my_generation) {
ap_bclose(conn_io);
clean_child_exit(0);
}
-@@ -4620,6 +4709,9 @@
+@@ -4645,6 +4734,9 @@
*/
#ifdef NO_LINGCLOSE
ap_bclose(conn_io); /* just close it */
#else
if (r && r->connection
-@@ -4630,6 +4722,9 @@
+@@ -4655,6 +4747,9 @@
lingering_close(r);
}
else {
ap_bsetflag(conn_io, B_EOUT, 1);
ap_bclose(conn_io);
}
-@@ -5389,16 +5484,31 @@
+@@ -5420,16 +5515,31 @@
usage(argv[0]);
}
}
}
child_timeouts = !ap_standalone || one_process;
-@@ -5529,6 +5639,10 @@
+@@ -5576,6 +5686,10 @@
ap_destroy_pool(r->pool);
}
ap_bclose(cio);
}
exit(0);
-@@ -5905,6 +6019,9 @@
+@@ -5952,6 +6066,9 @@
ap_kill_cleanups_for_socket(ptrans, csd);
#ifdef NO_LINGCLOSE
ap_bclose(conn_io); /* just close it */
#else
if (r && r->connection
-@@ -5915,6 +6032,9 @@
+@@ -5962,6 +6079,9 @@
lingering_close(r);
}
else {
ap_bsetflag(conn_io, B_EOUT, 1);
ap_bclose(conn_io);
}
-@@ -7478,6 +7598,10 @@
+@@ -7530,6 +7650,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),
-@@ -7517,6 +7641,9 @@
+@@ -7569,6 +7693,9 @@
}
#else /* ndef WIN32 */
server_conf = ap_read_config(pconf, ptrans, ap_server_confname);
| conn_rec structures.
+---------------------------------------------------------------------------
Index: src/main/http_request.c
---- src/main/http_request.c 27 Mar 2002 15:23:02 -0000 1.1.1.14
-+++ src/main/http_request.c 27 Mar 2002 15:30:02 -0000 1.14
+--- src/main/http_request.c 19 Jun 2002 07:20:26 -0000 1.1.1.15
++++ src/main/http_request.c 19 Jun 2002 07:29:09 -0000 1.15
@@ -1375,6 +1375,10 @@
new->method = r->method;
| request_rec structures.
+---------------------------------------------------------------------------
Index: src/main/http_protocol.c
---- src/main/http_protocol.c 27 Mar 2002 15:23:02 -0000 1.1.1.16
-+++ src/main/http_protocol.c 27 Mar 2002 15:30:02 -0000 1.16
-@@ -1151,6 +1151,10 @@
+--- src/main/http_protocol.c 19 Jun 2002 07:20:26 -0000 1.1.1.17
++++ src/main/http_protocol.c 19 Jun 2002 07:29:09 -0000 1.17
+@@ -1167,6 +1167,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);
-@@ -1299,6 +1303,11 @@
+@@ -1323,6 +1327,11 @@
rnew->read_body = REQUEST_NO_BODY;
rnew->main = (request_rec *) r;
| one hook for creating new %x tags at all.
+---------------------------------------------------------------------------
Index: src/modules/standard/mod_log_config.c
---- src/modules/standard/mod_log_config.c 27 Mar 2002 15:23:05 -0000 1.1.1.12
-+++ src/modules/standard/mod_log_config.c 27 Mar 2002 15:30:03 -0000 1.25
+--- src/modules/standard/mod_log_config.c 19 Jun 2002 07:20:30 -0000 1.1.1.13
++++ src/modules/standard/mod_log_config.c 19 Jun 2002 07:29:09 -0000 1.26
@@ -262,6 +262,9 @@
typedef const char *(*item_key_func) (request_rec *, char *);
item_key_func func;
char *arg;
int condition_sense;
-@@ -573,15 +576,36 @@
+@@ -580,15 +583,36 @@
}
};
return NULL;
}
-@@ -707,7 +731,11 @@
+@@ -714,7 +738,11 @@
break;
default:
if (!l) {
char dummy[2];
-@@ -716,6 +744,9 @@
+@@ -723,6 +751,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;
-@@ -777,6 +808,15 @@
+@@ -784,6 +815,15 @@
/* We do. Do it... */
| variables from other modules.
+---------------------------------------------------------------------------
Index: src/modules/standard/mod_rewrite.c
---- src/modules/standard/mod_rewrite.c 27 Mar 2002 15:23:06 -0000 1.1.1.14
-+++ src/modules/standard/mod_rewrite.c 27 Mar 2002 15:30:03 -0000 1.12
+--- src/modules/standard/mod_rewrite.c 19 Jun 2002 07:20:30 -0000 1.1.1.15
++++ src/modules/standard/mod_rewrite.c 19 Jun 2002 07:29:09 -0000 1.13
@@ -3678,6 +3678,15 @@
}
#endif /* ndef WIN32 && NETWARE*/
| recognize more schemes by intercepting this processing.
+---------------------------------------------------------------------------
Index: src/modules/proxy/mod_proxy.c
---- src/modules/proxy/mod_proxy.c 27 Mar 2002 15:23:03 -0000 1.1.1.11
-+++ src/modules/proxy/mod_proxy.c 27 Mar 2002 15:30:03 -0000 1.18
-@@ -215,6 +215,9 @@
+--- src/modules/proxy/mod_proxy.c 19 Jun 2002 07:20:27 -0000 1.1.1.12
++++ src/modules/proxy/mod_proxy.c 19 Jun 2002 07:29:09 -0000 1.19
+@@ -218,6 +218,9 @@
static int proxy_fixup(request_rec *r)
{
char *url, *p;
if (r->proxyreq == NOT_PROXY || strncmp(r->filename, "proxy:", 6) != 0)
return DECLINED;
-@@ -222,6 +225,14 @@
+@@ -225,6 +228,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)
-@@ -237,9 +248,44 @@
+@@ -240,9 +251,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 */
-@@ -370,6 +416,14 @@
- /* CONNECT is a special method that bypasses the normal
- * proxy code.
+@@ -374,6 +420,14 @@
+ * CONNECT is a special method that bypasses the normal proxy
+ * code.
*/
+#ifdef EAPI
+ if (!ap_hook_use("ap::mod_proxy::handler",
+#endif /* EAPI */
if (r->method_number == M_CONNECT)
rc = ap_proxy_connect_handler(r, cr, url, ents[i].hostname,
+ ents[i].port);
+@@ -383,6 +437,9 @@
ents[i].port);
-@@ -379,6 +433,9 @@
- ents[i].port);
else
rc = DECLINED;
+#ifdef EAPI
/* an error or success */
if (rc != DECLINED && rc != HTTP_BAD_GATEWAY)
-@@ -392,6 +449,14 @@
+@@ -397,6 +454,14 @@
*/
/* handle the scheme */
if (r->method_number == M_CONNECT) {
return ap_proxy_connect_handler(r, cr, url, NULL, 0);
}
-@@ -973,6 +1038,12 @@
+@@ -994,4 +1059,10 @@
NULL, /* child_init */
NULL, /* child_exit */
proxy_detect /* post read-request */
+ NULL /* EAPI: new_connection */
+#endif
};
-
-
+---------------------------------------------------------------------------
| Add hooks to the HTTP processing to allow other modules
| to enhance it by intercepting this processing.
+---------------------------------------------------------------------------
Index: src/modules/proxy/proxy_http.c
---- src/modules/proxy/proxy_http.c 27 Mar 2002 15:23:04 -0000 1.1.1.13
-+++ src/modules/proxy/proxy_http.c 27 Mar 2002 15:30:03 -0000 1.21
-@@ -166,6 +166,9 @@
- const char *urlptr = NULL;
+--- src/modules/proxy/proxy_http.c 19 Jun 2002 07:20:27 -0000 1.1.1.14
++++ src/modules/proxy/proxy_http.c 19 Jun 2002 07:29:09 -0000 1.22
+@@ -170,6 +170,9 @@
const char *datestr, *urlstr;
+ int result, major, minor;
const char *content_length;
+#ifdef EAPI
+ char *peer;
void *sconf = r->server->module_config;
proxy_server_conf *conf =
-@@ -186,6 +189,12 @@
+@@ -191,6 +194,12 @@
return HTTP_BAD_REQUEST;
urlptr += 3;
destport = DEFAULT_HTTP_PORT;
strp = strchr(urlptr, '/');
if (strp == NULL) {
desthost = ap_pstrdup(p, urlptr);
-@@ -223,12 +232,18 @@
+@@ -228,12 +237,18 @@
err = ap_proxy_host2addr(proxyhost, &server_hp);
if (err != NULL)
return DECLINED; /* try another */
}
-@@ -301,14 +316,42 @@
+@@ -308,14 +323,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 27 Mar 2002 15:23:11 -0000 1.1.1.11
-+++ src/support/apxs.pl 27 Mar 2002 15:30:03 -0000 1.11
-@@ -704,5 +704,11 @@
+--- src/support/apxs.pl 19 Jun 2002 07:20:34 -0000 1.1.1.12
++++ src/support/apxs.pl 19 Jun 2002 07:29:09 -0000 1.12
+@@ -711,5 +711,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 27 Mar 2002 15:23:12 -0000 1.1.1.10
-+++ src/support/httpd.exp 27 Mar 2002 15:30:03 -0000 1.12
-@@ -423,3 +423,59 @@
+--- src/support/httpd.exp 19 Jun 2002 07:20:34 -0000 1.1.1.11
++++ src/support/httpd.exp 19 Jun 2002 07:29:09 -0000 1.13
+@@ -427,3 +427,59 @@
XML_SetUnparsedEntityDeclHandler
XML_SetUserData
XML_UseParserAsHandlerArg
| Windows 95 and similar braindead platforms as DDL.
+---------------------------------------------------------------------------
Index: src/ApacheCore.def
---- src/ApacheCore.def 27 Mar 2002 15:22:53 -0000 1.1.1.9
-+++ src/ApacheCore.def 27 Mar 2002 15:30:02 -0000 1.13
-@@ -444,3 +444,67 @@
+--- 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
ap_get_chunk_size @440
ap_escape_logitem @441