diff -ur httpd-2.2.4/modules/dav/main/mod_dav.c httpd-2.2.4.dav-forced-scheme-port/modules/dav/main/mod_dav.c
--- httpd-2.2.4/modules/dav/main/mod_dav.c	2006-07-12 03:38:44.000000000 +0000
+++ httpd-2.2.4.dav-forced-scheme-port/modules/dav/main/mod_dav.c	2008-01-05 16:13:11.000000000 +0000
@@ -79,6 +79,8 @@
     const char *dir;
     int locktimeout;
     int allow_depthinfinity;
+    const char *forced_scheme;
+    int forced_port;
 
 } dav_dir_conf;
 
@@ -162,6 +164,9 @@
             d[l - 1] = '\0';
         conf->dir = d;
     }
+    
+    conf->forced_scheme = NULL;
+    conf->forced_port = 0;
 
     return conf;
 }
@@ -195,7 +200,8 @@
     newconf->dir = DAV_INHERIT_VALUE(parent, child, dir);
     newconf->allow_depthinfinity = DAV_INHERIT_VALUE(parent, child,
                                                      allow_depthinfinity);
-
+    newconf->forced_scheme = DAV_INHERIT_VALUE(parent, child, forced_scheme);
+    newconf->forced_port = DAV_INHERIT_VALUE(parent, child, forced_port);
     return newconf;
 }
 
@@ -302,6 +308,34 @@
 }
 
 /*
+ * Command handler for DAVForcedScheme directive, which is TAKE1
+ */
+static const char *dav_cmd_davforcedscheme(cmd_parms *cmd, void *config,
+                                           const char *arg1)
+{
+    dav_dir_conf *conf = (dav_dir_conf *)config;
+    if (arg1) {
+        conf->forced_scheme = apr_pstrdup(cmd->pool, arg1);
+    }
+    return NULL;
+}
+
+/*
+ * Command handler for DAVForcedPort directive, which is TAKE1
+ */
+static const char *dav_cmd_davforcedport(cmd_parms *cmd, void *config,
+                                         const char *arg1)
+{
+    dav_dir_conf *conf = (dav_dir_conf *)config;
+    conf->forced_port = atoi(arg1);
+    if (conf->forced_port < 1) {
+        return "DAVForcedPort requires a positive integer.";
+    }
+    
+    return NULL;
+}
+
+/*
 ** dav_error_response()
 **
 ** Send a nice response back to the user. In most cases, Apache doesn't
@@ -4782,6 +4816,23 @@
     return DECLINED;
 }
 
+/* For adjusting the scheme and/or port of URIs */
+DAV_DECLARE(void) dav_fixup_uri(request_rec *r, apr_uri_t *comp)
+{
+    /* Force comp.scheme and comp.port if set in config, to deal
+     * with HTTPS->HTTP proxying issues
+     */
+    dav_dir_conf *conf;
+    conf = (dav_dir_conf *)ap_get_module_config(r->per_dir_config,
+                                                &dav_module);
+    if (conf->forced_scheme) {
+        comp->scheme = apr_pstrdup(r->pool, conf->forced_scheme);
+    }
+    if (conf->forced_port) {
+        comp->port = conf->forced_port;
+    }
+}
+
 static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(dav_handler, NULL, NULL, APR_HOOK_MIDDLE);
@@ -4816,6 +4867,14 @@
                  ACCESS_CONF|RSRC_CONF,
                  "allow Depth infinity PROPFIND requests"),
 
+    /* per directory/location */
+    AP_INIT_TAKE1("DAVForcedScheme", dav_cmd_davforcedscheme, NULL, ACCESS_CONF,
+          "specify a scheme to force when looking up URIs"),
+
+    /* per directory/location */
+    AP_INIT_TAKE1("DAVForcedPort", dav_cmd_davforcedport, NULL, ACCESS_CONF,
+          "specify a port to force when looking up URIs"),
+
     { NULL }
 };
 
diff -ur httpd-2.2.4/modules/dav/main/mod_dav.h httpd-2.2.4.dav-forced-scheme-port/modules/dav/main/mod_dav.h
--- httpd-2.2.4/modules/dav/main/mod_dav.h	2006-07-12 03:38:44.000000000 +0000
+++ httpd-2.2.4.dav-forced-scheme-port/modules/dav/main/mod_dav.h	2008-01-05 14:05:50.000000000 +0000
@@ -472,6 +472,9 @@
 DAV_DECLARE(dav_lookup_result) dav_lookup_uri(const char *uri, request_rec *r,
                                               int must_be_absolute);
 
+/* For adjusting the scheme and/or port of URIs */
+DAV_DECLARE(void) dav_fixup_uri(request_rec *r, apr_uri_t *comp);
+
 /* defines type of property info a provider is to return */
 typedef enum {
     DAV_PROP_INSERT_NOTDEF,     /* property is defined by this provider,
diff -ur httpd-2.2.4/modules/dav/main/util.c httpd-2.2.4.dav-forced-scheme-port/modules/dav/main/util.c
--- httpd-2.2.4/modules/dav/main/util.c	2006-07-12 03:38:44.000000000 +0000
+++ httpd-2.2.4.dav-forced-scheme-port/modules/dav/main/util.c	2008-01-05 16:14:33.000000000 +0000
@@ -203,6 +203,10 @@
     */
     if (comp.scheme != NULL || comp.port != 0 || must_be_absolute)
     {
+            
+        /* Adjust scheme and port if config directives say so */
+        dav_fixup_uri(r, &comp);
+        
         /* ### not sure this works if the current request came in via https: */
         scheme = r->parsed_uri.scheme;
         if (scheme == NULL)
