ap_include_extern_func's (needed for a couple upcoming XSSI-extending modules). Also fix apxs to use `install' and fix the cgi-bin `preservation' while we're here.
65 lines
1.9 KiB
Text
65 lines
1.9 KiB
Text
$NetBSD: patch-af,v 1.3 1998/12/04 17:23:20 tv Exp $
|
|
|
|
--- src/modules/standard/mod_include.c.orig Thu Sep 24 10:06:42 1998
|
|
+++ src/modules/standard/mod_include.c Fri Dec 4 10:51:50 1998
|
|
@@ -92,7 +92,11 @@
|
|
#include "http_log.h"
|
|
#include "http_main.h"
|
|
#include "util_script.h"
|
|
+#include "ap_include_extern.h"
|
|
+#include "ap_hook.h"
|
|
#endif
|
|
+#define get_tag ap_include_get_tag
|
|
+#define parse_string ap_include_parse_string
|
|
|
|
#define STARTING_SEQUENCE "<!--#"
|
|
#define ENDING_SEQUENCE "-->"
|
|
@@ -354,7 +358,8 @@
|
|
* the tag value is html decoded if dodecode is non-zero
|
|
*/
|
|
|
|
-static char *get_tag(pool *p, FILE *in, char *tag, int tagbuf_len, int dodecode)
|
|
+API_EXPORT(char *)
|
|
+ap_include_get_tag(pool *p, FILE *in, char *tag, int tagbuf_len, int dodecode)
|
|
{
|
|
char *t = tag, *tag_val, c, term;
|
|
|
|
@@ -473,7 +478,7 @@
|
|
/*
|
|
* Do variable substitution on strings
|
|
*/
|
|
-static void parse_string(request_rec *r, const char *in, char *out,
|
|
+API_EXPORT(void) ap_include_parse_string(request_rec *r, const char *in, char *out,
|
|
size_t length, int leave_name)
|
|
{
|
|
char ch;
|
|
@@ -2090,6 +2095,16 @@
|
|
}
|
|
}
|
|
|
|
+API_EXPORT(int)
|
|
+ap_include_register_extern(const char *cmd, ap_include_extern_func func) {
|
|
+ char cmdbuf[40] = "include::";
|
|
+
|
|
+ strncat(cmdbuf, cmd, 30);
|
|
+ ap_hook_configure(cmdbuf, AP_HOOK_SIG5(int,ptr,ptr,ptr,ptr), AP_HOOK_DECLINE(-32767));
|
|
+ ap_hook_register(cmdbuf, func, NULL);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
|
|
|
|
/* -------------------------- The main function --------------------------- */
|
|
@@ -2214,6 +2229,12 @@
|
|
}
|
|
#endif
|
|
else {
|
|
+ char cmdbuf[40] = "include::";
|
|
+
|
|
+ strncat(cmdbuf, directive, 30);
|
|
+ if (ap_hook_call(cmdbuf, &ret, f, r, error, timefmt) == TRUE)
|
|
+ continue;
|
|
+
|
|
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
|
|
"httpd: unknown directive \"%s\" "
|
|
"in parsed doc %s",
|