summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/server/mod-wiring.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/server/mod-wiring.cpp b/sca-cpp/trunk/modules/server/mod-wiring.cpp
index 67b179e7a1..e873733939 100644
--- a/sca-cpp/trunk/modules/server/mod-wiring.cpp
+++ b/sca-cpp/trunk/modules/server/mod-wiring.cpp
@@ -102,10 +102,13 @@ int translateReference(const ServerConf& sc, request_rec *r) {
debug(target, "modwiring::translateReference::target");
// Route to an absolute target URI using mod_proxy or an HTTP client redirect
+ const list<value> pathInfo = cdddr(rpath);
if (httpd::isAbsolute(target)) {
if (useModProxy) {
- // Build proxy URI using current request's protocol scheme
- r->filename = apr_pstrdup(r->pool, c_str(string("proxy:") + httpd::scheme(r) + substr(target, find(target, "://"))));
+ // Build proxy URI
+ // current request's protocol scheme, reference target uri and request path info
+ string turi = httpd::scheme(r) + substr(target, find(target, "://")) + path(pathInfo);
+ r->filename = apr_pstrdup(r->pool, c_str(string("proxy:") + turi));
debug(r->filename, "modwiring::translateReference::filename");
r->proxyreq = PROXYREQ_REVERSE;
r->handler = "proxy-server";
@@ -118,7 +121,10 @@ int translateReference(const ServerConf& sc, request_rec *r) {
}
// Route to a relative target URI using a local internal redirect
- r->filename = apr_pstrdup(r->pool, c_str(string("/redirect:/components/") + substr(target, 0, find(target, '/'))));
+ // /components/, target component name and request path info
+ const value tname = substr(target, 0, find(target, '/'));
+ const string tpath = path(cons(tname, pathInfo));
+ r->filename = apr_pstrdup(r->pool, c_str(string("/redirect:/components") + tpath));
debug(r->filename, "modwiring::translateReference::filename");
r->handler = "mod_tuscany_wiring";
return OK;