rse 98/03/14 04:22:11
Modified: . STATUS
src CHANGES
src/main http_request.c
src/modules/proxy proxy_ftp.c
src/modules/standard mod_mime.c
src/include hide.h
Removed: src/modules/standard mod_mime.h
Log:
The unbundling of mod_proxy and mod_mime by fixing the MIME type problem where
it was caused and not by using the cross-module call mime_find_ct from
mod_proxy to mod_mime.
Revision Changes Path
1.189 +1 -0 apache-1.3/STATUS
Index: STATUS
===================================================================
RCS file: /export/home/cvs/apache-1.3/STATUS,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -r1.188 -r1.189
--- STATUS 1998/03/13 23:53:58 1.188
+++ STATUS 1998/03/14 12:22:03 1.189
@@ -84,6 +84,7 @@
* Ralf's support for building shared objects even for library-style
modules
* Performance improvements to invoke_handler().
* Ben Hyde's check to make sure the "Port" range is valid
+ * Ralf's Unbundling mod_proxy and mod_mime (making mime_find_ct obsolete)
Available Patches:
1.709 +11 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.708
retrieving revision 1.709
diff -u -r1.708 -r1.709
--- CHANGES 1998/03/14 02:43:42 1.708
+++ CHANGES 1998/03/14 12:22:04 1.709
@@ -1,4 +1,15 @@
Changes with Apache 1.3b6
+
+ *) Making the hard-coded cross-module function call mime_find_ct() (from
+ mod_proxy to mod_mime) obsolete by making sure the API hook for MIME
type
+ checking is really called even for proxy requests except for URLs with
+ HTTP schemes (because there we can optimize by not running the type
+ checking hooks due to the fact that the proxy gets the MIME Content-type
+ from the remote host later). This change cleans up mod_mime by removing
+ the ugly export kludge, makes the one-liner file mod_mime.h obsolete,
and
+ especially unbundles mod_proxy and mod_mime. This way they both now can
+ be compiled as shared objects and are no longer tied together.
+ [Ralf S. Engelschall]
*) util.c cleanup and speedup. [Dean Gaudet]
1.112 +8 -5 apache-1.3/src/main/http_request.c
Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_request.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- http_request.c 1998/03/06 09:37:06 1.111
+++ http_request.c 1998/03/14 12:22:07 1.112
@@ -1127,11 +1127,14 @@
break;
}
- if (!r->proxyreq)
- if ((access_status = find_types(r)) != 0) {
- decl_die(access_status, "find types", r);
- return;
- }
+ if (! (r->proxyreq
+ && r->parsed_uri.scheme != NULL
+ && strcmp(r->parsed_uri.scheme, "http") == 0) ) {
+ if ((access_status = find_types(r)) != 0) {
+ decl_die(access_status, "find types", r);
+ return;
+ }
+ }
if ((access_status = run_fixups(r)) != 0) {
die(access_status, r);
1.50 +0 -2 apache-1.3/src/modules/proxy/proxy_ftp.c
Index: proxy_ftp.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_ftp.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- proxy_ftp.c 1998/02/22 21:35:31 1.49
+++ proxy_ftp.c 1998/03/14 12:22:08 1.50
@@ -55,7 +55,6 @@
#include "mod_proxy.h"
#include "http_main.h"
-#include "../standard/mod_mime.h"
DEF_Explain
@@ -929,7 +928,6 @@
if (parms[0] == 'd')
proxy_add_header(resp_hdrs, "Content-Type", "text/html", HDR_REP);
else {
- mime_find_ct(r);
if (r->content_type != NULL) {
proxy_add_header(resp_hdrs, "Content-Type", r->content_type,
HDR_REP);
1.36 +0 -6 apache-1.3/src/modules/standard/mod_mime.c
Index: mod_mime.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- mod_mime.c 1998/03/13 19:20:40 1.35
+++ mod_mime.c 1998/03/14 12:22:09 1.36
@@ -237,7 +237,6 @@
cfg_closefile(f);
}
-/* note that the proxy module uses this via mime_find_ct */
static int find_ct(request_rec *r)
{
const char *fn = strrchr(r->filename, '/');
@@ -323,11 +322,6 @@
return DECLINED;
return OK;
-}
-
-API_EXPORT(int) mime_find_ct(request_rec *r)
-{
- return find_ct(r);
}
module MODULE_VAR_EXPORT mime_module =
1.11 +0 -1 apache-1.3/src/include/hide.h
Index: hide.h
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/include/hide.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- hide.h 1998/03/13 16:49:45 1.10
+++ hide.h 1998/03/14 12:22:10 1.11
@@ -349,7 +349,6 @@
#define merge_core_server_configs AP_merge_core_server_configs
#define merge_per_dir_configs AP_merge_per_dir_configs
#define merge_server_configs AP_merge_server_configs
-#define mime_find_ct AP_mime_find_ct
#define month_snames AP_month_snames
#define new_block AP_new_block
#define no2slash AP_no2slash