summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-03-13 19:24:14 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-03-13 19:24:14 +0000
commitea149af7638e1edb2f652789ddf87cf111747b98 (patch)
tree478bb7f7444fc59c5f2cb3b062123dc29d278b8f /sca-cpp/trunk
parentf6590bf7b692991cb196fe8163010ea09b83ff52 (diff)
Fix app link creation and save one HTTP proxy hop.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1081206 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk')
-rw-r--r--sca-cpp/trunk/modules/edit/apps.py1
-rw-r--r--sca-cpp/trunk/modules/server/mod-eval.hpp16
2 files changed, 14 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/edit/apps.py b/sca-cpp/trunk/modules/edit/apps.py
index 2980a9e5e3..29b470255c 100644
--- a/sca-cpp/trunk/modules/edit/apps.py
+++ b/sca-cpp/trunk/modules/edit/apps.py
@@ -29,6 +29,7 @@ def appid(id):
def mkapplink(id):
try:
os.symlink('../../../../../nuvem/nuvem-parallel/nuvem', 'apps/' + car(id) + '/nuvem')
+ os.symlink('../../../../components', 'apps/' + car(id) + '/lib')
os.mkdir('apps/' + car(id) + '/htdocs')
os.symlink('../../../htdocs/login', 'apps/' + car(id) + '/htdocs/login');
os.symlink('../../../htdocs/logout', 'apps/' + car(id) + '/htdocs/logout');
diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp
index 634bc5999f..a389c713d7 100644
--- a/sca-cpp/trunk/modules/server/mod-eval.hpp
+++ b/sca-cpp/trunk/modules/server/mod-eval.hpp
@@ -292,7 +292,7 @@ int translate(request_rec *r) {
}
/**
- * Make an HTTP proxy lambda.
+ * Make an HTTP proxy lambda to a component reference.
*/
const value mkhttpProxy(const ServerConf& sc, const string& ref, const string& base) {
const string uri = base + ref;
@@ -301,6 +301,14 @@ const value mkhttpProxy(const ServerConf& sc, const string& ref, const string& b
}
/**
+ * Make an HTTP proxy lambda to an absolute URI
+ */
+const value mkhttpProxy(const ServerConf& sc, const string& uri) {
+ debug(uri, "modeval::mkhttpProxy::uri");
+ return lambda<value(const list<value>&)>(http::proxy(uri, "", "", "", sc.p));
+}
+
+/**
* Return a component implementation proxy lambda.
*/
class implProxy {
@@ -345,8 +353,10 @@ const value mkrefProxy(const ServerConf& sc, const value& ref, const string& bas
debug(target, "modeval::mkrefProxy::target");
// Use an HTTP proxy or an internal proxy to the component implementation
- if (isNil(target) || httpd::isAbsolute(target))
+ if (isNil(target))
return mkhttpProxy(sc, scdl::name(ref), base);
+ if (httpd::isAbsolute(target))
+ return mkhttpProxy(sc, target);
return mkimplProxy(sc, car(pathValues(target)));
}
@@ -507,7 +517,7 @@ const value evalComponent(ServerConf& sc, const value& comp) {
base << sc.wiringServerName << "/references/" << string(scdl::name(comp)) << "/";
const list<value> rpx(refProxies(sc, scdl::references(comp), str(base)));
- // Convert component proxies to configured proxy lambdas
+ // Convert component properties to configured proxy lambdas
const list<value> ppx(propProxies(scdl::properties(comp)));
// Evaluate the component implementation and convert it to an applicable lambda function