> I have not used the write-through proxy functionality before so maybe
> I botched something with my configuration? I attached my httpd.conf...
Resending. The attached conf file didn't come through to the list
(though Kamesh got it).
Paul
Index: subversion/mod_dav_svn/dav_svn.h
===================================================================
--- subversion/mod_dav_svn/dav_svn.h (revision 1126560)
+++ subversion/mod_dav_svn/dav_svn.h (working copy)
@@ -332,7 +332,7 @@
/* Return the activities db */
const char * dav_svn__get_activities_db(request_rec *r);
-/* Return the root directory */
+/* Return the root directory in canonicalized form */
const char * dav_svn__get_root_dir(request_rec *r);
/*** activity.c ***/
Index: subversion/mod_dav_svn/mirror.c
===================================================================
--- subversion/mod_dav_svn/mirror.c (revision 1126560)
+++ subversion/mod_dav_svn/mirror.c (working copy)
@@ -122,7 +122,7 @@
locate_ctx_t *ctx = f->ctx;
apr_status_t rv;
apr_bucket *bkt;
- const char *master_uri, *root_dir;
+ const char *master_uri, *root_dir, *canonicalized_uri;
apr_uri_t uri;
/* Don't filter if we're in a subrequest or we aren't setup to
@@ -137,7 +137,11 @@
(that is, if our root path matches that of the master server). */
apr_uri_parse(r->pool, master_uri, &uri);
root_dir = dav_svn__get_root_dir(r);
- if (strcmp(uri.path, root_dir) == 0) {
+ if (uri.path)
+ canonicalized_uri = svn_path_canonicalize(uri.path, r->pool);
+ else
+ canonicalized_uri = uri.path;
+ if (strcmp(canonicalized_uri, root_dir) == 0) {
ap_remove_input_filter(f);
return ap_get_brigade(f->next, bb, mode, block, readbytes);
}
@@ -150,7 +154,7 @@
if (!f->ctx) {
ctx = f->ctx = apr_pcalloc(r->pool, sizeof(*ctx));
- ctx->remotepath = svn_path_uri_encode(uri.path, r->pool);
+ ctx->remotepath = svn_path_uri_encode(canonicalized_uri, r->pool);
ctx->remotepath_len = strlen(ctx->remotepath);
ctx->localpath = svn_path_uri_encode(root_dir, r->pool);
ctx->localpath_len = strlen(ctx->localpath);
@@ -221,7 +225,7 @@
start_foo += strlen(master_uri);
new_uri = ap_construct_url(r->pool,
apr_pstrcat(r->pool,
- dav_svn__get_root_dir(r),
+ dav_svn__get_root_dir(r), "/",
start_foo, NULL),
r);
new_uri = svn_path_uri_encode(new_uri, r->pool);
@@ -236,7 +240,7 @@
request_rec *r = f->r;
locate_ctx_t *ctx = f->ctx;
apr_bucket *bkt;
- const char *master_uri, *root_dir;
+ const char *master_uri, *root_dir, *canonicalized_uri;
apr_uri_t uri;
/* Don't filter if we're in a subrequest or we aren't setup to
@@ -251,7 +255,11 @@
(that is, if our root path matches that of the master server). */
apr_uri_parse(r->pool, master_uri, &uri);
root_dir = dav_svn__get_root_dir(r);
- if (strcmp(uri.path, root_dir) == 0) {
+ if (uri.path)
+ canonicalized_uri = svn_path_canonicalize(uri.path, r->pool);
+ else
+ canonicalized_uri = uri.path;
+ if (strcmp(canonicalized_uri, root_dir) == 0) {
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
}
@@ -266,7 +274,7 @@
ctx = f->ctx = apr_pcalloc(r->pool, sizeof(*ctx));
/* We are url encoding the current url and the master url
as incoming (from master) request body has it encoded already. */
- ctx->remotepath = svn_path_uri_encode(uri.path, r->pool);
+ ctx->remotepath = svn_path_uri_encode(canonicalized_uri, r->pool);
ctx->remotepath_len = strlen(ctx->remotepath);
ctx->localpath = svn_path_uri_encode(root_dir, r->pool);
ctx->localpath_len = strlen(ctx->localpath);
Index: subversion/mod_dav_svn/mod_dav_svn.c
===================================================================
--- subversion/mod_dav_svn/mod_dav_svn.c (revision 1126560)
+++ subversion/mod_dav_svn/mod_dav_svn.c (working copy)
@@ -163,7 +163,8 @@
/* NOTE: dir==NULL creates the default per-dir config */
dir_conf_t *conf = apr_pcalloc(p, sizeof(*conf));
- conf->root_dir = dir;
+ if (dir)
+ conf->root_dir = svn_path_canonicalize(dir, p);
conf->bulk_updates = CONF_FLAG_ON;
return conf;