Copied: tuscany/sca-cpp/trunk/modules/http/mod-security-audit-conf (from r1311137, tuscany/sca-cpp/trunk/components/cache/memcached-stop) URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/mod-security-audit-conf?p2=tuscany/sca-cpp/trunk/modules/http/mod-security-audit-conf&p1=tuscany/sca-cpp/trunk/components/cache/memcached-stop&r1=1311137&r2=1343138&rev=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/components/cache/memcached-stop (original) +++ tuscany/sca-cpp/trunk/modules/http/mod-security-audit-conf Mon May 28 04:39:18 2012 @@ -17,24 +17,28 @@ # specific language governing permissions and limitations # under the License. -# Stop memcached +# Generate a minimal mod-security audit configuration. here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +mkdir -p $1 root=`echo "import os; print os.path.realpath('$1')" | python` -addr=$2 -if [ "$addr" = "" ]; then - ip="" - port="11211" -else - ip=`$here/../../modules/http/httpd-addr ip $addr` - port=`$here/../../modules/http/httpd-addr port $addr` -fi - -memcached_prefix=`cat $here/memcached.prefix` -if [ "$ip" = "" ]; then - mc="$memcached_prefix/bin/memcached -d -m 4 -p $port" -else - mc="$memcached_prefix/bin/memcached -d -l $ip -m 4 -p $port" -fi +mkdir -p $root/tmp + +cat >>$root/conf/mod-security.conf <<EOF +# Generated by: mod-security-audit-conf $* +# Enable mod-security audit log +SecAuditEngine RelevantOnly +SecAuditLogRelevantStatus "^(?:5|4(?!04))" +SecAuditLogParts ABIJDEFHKZ +SecAuditLogType Serial +Include conf/mod-security-audit-log.conf + +EOF + +# Configure audit logging +cat >$root/conf/mod-security-audit-log.conf <<EOF +# Generated by: mod-security-audit-conf $* +SecAuditLog $root/logs/secaudit_log + +EOF -kill `ps -ef | grep -v grep | grep "${mc}" | awk '{ print $2 }'`
Modified: tuscany/sca-cpp/trunk/modules/http/mod-security-conf URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/mod-security-conf?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/http/mod-security-conf (original) +++ tuscany/sca-cpp/trunk/modules/http/mod-security-conf Mon May 28 04:39:18 2012 @@ -81,8 +81,8 @@ IH %{MULTIPART_FILE_LIMIT_EXCEEDED}'" SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" "phase:2,t:none,log,deny,status:44,msg:'Multipart parser detected a possible unmatched boundary.'" # Avoid a potential RegEx DoS condition -SecPcreMatchLimit 10000 -SecPcreMatchLimitRecursion 10000 +SecPcreMatchLimit 50000 +SecPcreMatchLimitRecursion 50000 SecRule TX:/^MSC_/ "!@streq 0" "phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'" # Detect slow DoS attacks @@ -100,13 +100,6 @@ SecResponseBodyLimitAction ProcessPartia SecTmpDir $root/tmp/ SecDataDir $root/tmp/ -# Enable mod-security audit log -SecAuditEngine RelevantOnly -SecAuditLogRelevantStatus "^(?:5|4(?!04))" -SecAuditLogParts ABIJDEFHKZ -SecAuditLogType Serial -Include conf/mod-security-log.conf - # Use & as application/x-www-form-urlencoded parameter separator SecArgumentSeparator & @@ -120,8 +113,8 @@ setvar:tx.critical_anomaly_score=5, \ setvar:tx.error_anomaly_score=4, \ setvar:tx.warning_anomaly_score=3, \ setvar:tx.notice_anomaly_score=2" -SecAction "phase:1,id:'981208',t:none,nolog,pass,setvar:tx.inbound_anomaly_score_level=5" -SecAction "phase:1,id:'981209',t:none,nolog,pass,setvar:tx.outbound_anomaly_score_level=4" +SecAction "phase:1,id:'981208',t:none,nolog,pass,setvar:tx.inbound_anomaly_score_level=10" +SecAction "phase:1,id:'981209',t:none,nolog,pass,setvar:tx.outbound_anomaly_score_level=8" # Paranoid mode SecAction "phase:1,id:'981210',t:none,nolog,pass,setvar:tx.paranoid_mode=0" @@ -186,12 +179,6 @@ Include ${modsecurity_prefix}/optional_r Include ${modsecurity_prefix}/optional_rules/modsecurity_crs_42_comment_spam.conf Include ${modsecurity_prefix}/optional_rules/modsecurity_crs_47_skip_outbound_checks.conf Include ${modsecurity_prefix}/optional_rules/modsecurity_crs_55_application_defects.conf -EOF - -# Configure audit logging -cat >$root/conf/mod-security-log.conf <<EOF -# Generated by: mod-security-conf $* -SecAuditLog $root/logs/modsec_audit_log EOF Modified: tuscany/sca-cpp/trunk/modules/http/proxy-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/proxy-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/http/proxy-test (original) +++ tuscany/sca-cpp/trunk/modules/http/proxy-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ./httpd-conf tmp localhost 8091/8090 htdocs ./httpd-event-conf tmp ./httpd-start tmp Modified: tuscany/sca-cpp/trunk/modules/java/mod-java.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/mod-java.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/java/mod-java.cpp (original) +++ tuscany/sca-cpp/trunk/modules/java/mod-java.cpp Mon May 28 04:39:18 2012 @@ -73,6 +73,8 @@ const failable<lambda<value(const list<v } if (contains(itype, ".cpp")) return modcpp::evalImplementation(path, impl, px); + if (contains(itype, ".widget")) + return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype, -1, false); return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype); } Modified: tuscany/sca-cpp/trunk/modules/java/mod-java.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/mod-java.hpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/java/mod-java.hpp (original) +++ tuscany/sca-cpp/trunk/modules/java/mod-java.hpp Mon May 28 04:39:18 2012 @@ -52,7 +52,7 @@ struct applyImplementation { const value expr = append<value>(params, px); debug(expr, "modeval::java::applyImplementation::input"); const failable<value> res = java::evalClass(jr, expr, impl); - const value val = !hasContent(res)? mklist<value>(value(), reason(res)) : mklist<value>(content(res)); + const value val = !hasContent(res)? mklist<value>(value(), reason(res), rcode(res)) : mklist<value>(content(res)); debug(val, "modeval::java::applyImplementation::result"); return val; } @@ -66,7 +66,7 @@ const failable<lambda<value(const list<v const string cn(attributeValue("class", impl)); const failable<java::JavaClass> jc = java::readClass(jr, path, cn); if (!hasContent(jc)) - return mkfailure<lambda<value(const list<value>&)> >(reason(jc)); + return mkfailure<lambda<value(const list<value>&)> >(jc); return lambda<value(const list<value>&)>(applyImplementation(content(jc), px, jr)); } Modified: tuscany/sca-cpp/trunk/modules/java/server-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/server-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/java/server-test (original) +++ tuscany/sca-cpp/trunk/modules/java/server-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 ../server/htdocs ../server/server-conf tmp ./java-conf tmp Modified: tuscany/sca-cpp/trunk/modules/java/wiring-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/wiring-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/java/wiring-test (original) +++ tuscany/sca-cpp/trunk/modules/java/wiring-test Mon May 28 04:39:18 2012 @@ -22,6 +22,7 @@ here=`echo "import os; print os.path.rea curl_prefix=`cat $here/../http/curl.prefix` # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 ../server/htdocs ../server/server-conf tmp ./java-conf tmp Modified: tuscany/sca-cpp/trunk/modules/js/eval.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/eval.hpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/js/eval.hpp (original) +++ tuscany/sca-cpp/trunk/modules/js/eval.hpp Mon May 28 04:39:18 2012 @@ -36,7 +36,7 @@ #ifdef WANT_MAINTAINER_WARNINGS #pragma GCC diagnostic warning "-Wunused-parameter" #pragma GCC diagnostic warning "-Wsign-compare" -#pragma GCC diagnostic ignored "-Wredundant-decls" +#pragma GCC diagnostic warning "-Wredundant-decls" #endif #include "string.hpp" #include "list.hpp" Modified: tuscany/sca-cpp/trunk/modules/json/json.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/json/json.hpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/json/json.hpp (original) +++ tuscany/sca-cpp/trunk/modules/json/json.hpp Mon May 28 04:39:18 2012 @@ -72,7 +72,7 @@ const failable<list<value> > readJSON(co if(!JS_FinishJSONParse(cx, parser, JSVAL_NULL)) return mkfailure<list<value> >("JS_FinishJSONParse failed"); if(!hasContent(consumed)) - return mkfailure<list<value> >(reason(consumed)); + return mkfailure<list<value> >(consumed); return list<value>(js::jsValToValue(val, cx)); } @@ -149,7 +149,7 @@ const failable<list<string> > jsonResult const failable<value> jsonResultValue(const list<string>& s, js::JSContext& cx) { const failable<list<value> > jsres = json::readJSON(s, cx); if (!hasContent(jsres)) - return mkfailure<value>(reason(jsres)); + return mkfailure<value>(jsres); const list<value> rval(cadr<value>(elementsToValues(content(jsres)))); const value val = cadr(rval); if (isList(val) && !js::isJSArray(val)) Modified: tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp (original) +++ tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp Mon May 28 04:39:18 2012 @@ -235,7 +235,7 @@ const failable<int> authorize(const list // Store the request token in memcached const failable<bool> prc = memcache::put(mklist<value>("tuscanyOAuth1Token", cadr(tv)), cadr(sv), mc); if (!hasContent(prc)) - return mkfailure<int>(reason(prc)); + return mkfailure<int>(prc); // Redirect to the authorize URI const string authuri = httpd::unescape(cadr(auth)) + string("?") + http::queryString(mklist<list<value> >(tv)); @@ -327,7 +327,7 @@ const failable<int> accessToken(const li // Retrieve the request token from memcached const failable<value> sv = memcache::get(mklist<value>("tuscanyOAuth1Token", cadr(tv)), mc); if (!hasContent(sv)) - return mkfailure<int>(reason(sv)); + return mkfailure<int>(sv); // Build and sign access token request URI const string tokuri = httpd::unescape(cadr(tok)) + string("?") + http::queryString(mklist<list<value> >(vv)); @@ -374,13 +374,13 @@ const failable<int> accessToken(const li // Retrieve the user info from the profile const failable<list<value> > iv = profileUserInfo(cadr(cid), profres); if (!hasContent(iv)) - return mkfailure<int>(reason(iv)); + return mkfailure<int>(iv); // Store user info in memcached keyed by session ID const value sid = string("OAuth1_") + mkrand(); const failable<bool> prc = memcache::put(mklist<value>("tuscanyOAuth1", sid), content(iv), mc); if (!hasContent(prc)) - return mkfailure<int>(reason(prc)); + return mkfailure<int>(prc); // Send session ID to the client in a cookie debug(c_str(openauth::cookie("TuscanyOAuth1", sid, httpd::hostName(r))), "modoauth1::access_token::setcookie"); Modified: tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp (original) +++ tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp Mon May 28 04:39:18 2012 @@ -222,7 +222,7 @@ const failable<int> accessToken(const li const value tval = mklist<value>(string("application/x-www-form-urlencoded;charset=UTF-8"), mklist<value>(tqs)); const failable<value> ftr = http::post(tval, turi, *(cs)); if (!hasContent(ftr)) - return mkfailure<int>(reason(ftr)); + return mkfailure<int>(ftr); const value tr = content(ftr); debug(tr, "modoauth2::access_token::response"); if (!isList(tr) || isNil(tr)) @@ -247,13 +247,13 @@ const failable<int> accessToken(const li // Retrieve the user info from the profile const failable<list<value> > iv = profileUserInfo(cadr(cid), content(profres)); if (!hasContent(iv)) - return mkfailure<int>(reason(iv)); + return mkfailure<int>(iv); // Store user info in memcached keyed by session ID const value sid = string("OAuth2_") + mkrand(); const failable<bool> prc = memcache::put(mklist<value>("tuscanyOAuth2", sid), content(iv), mc); if (!hasContent(prc)) - return mkfailure<int>(reason(prc)); + return mkfailure<int>(prc); // Send session ID to the client in a cookie debug(c_str(openauth::cookie("TuscanyOAuth2", sid, httpd::hostName(r))), "modoauth2::access_token::setcookie"); Modified: tuscany/sca-cpp/trunk/modules/oauth/start-mixed-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/start-mixed-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/oauth/start-mixed-test (original) +++ tuscany/sca-cpp/trunk/modules/oauth/start-mixed-test Mon May 28 04:39:18 2012 @@ -24,6 +24,7 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` # Setup +rm -rf tmp ../../components/cache/memcached-start tmp 11212 ../../components/cache/memcached-start tmp 11213 Modified: tuscany/sca-cpp/trunk/modules/oauth/start-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/start-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/oauth/start-test (original) +++ tuscany/sca-cpp/trunk/modules/oauth/start-test Mon May 28 04:39:18 2012 @@ -21,6 +21,7 @@ # 127.0.0.1 www.example.com # Setup +rm -rf tmp #../../ubuntu/ip-redirect-all 80 8090 #../../ubuntu/ip-redirect-all 443 8453 Modified: tuscany/sca-cpp/trunk/modules/opencl/eval.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/opencl/eval.hpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/opencl/eval.hpp (original) +++ tuscany/sca-cpp/trunk/modules/opencl/eval.hpp Mon May 28 04:39:18 2012 @@ -475,7 +475,7 @@ const failable<list<OpenCLBuffer>> value return list<OpenCLBuffer>(); const failable<OpenCLBuffer> a = valueToKernelArg(car(v), i, kernel, cl, cq); if (!hasContent(a)) - return mkfailure<list<OpenCLBuffer>>(reason(a)); + return mkfailure<list<OpenCLBuffer>>(a); const failable<list<OpenCLBuffer>> al = valuesToKernelArgsListHelper(cdr(v), i + 1, kernel, cl, cq); if (!hasContent(al)) return al; @@ -600,7 +600,7 @@ const failable<value> evalKernel(const f #endif if (!hasContent(fkernel)) - return mkfailure<value>(reason(fkernel)); + return mkfailure<value>(fkernel); const OpenCLKernel kernel = content(fkernel); // Get a command queue for the specified device type @@ -609,7 +609,7 @@ const failable<value> evalKernel(const f // Set the kernel input args const failable<list<OpenCLBuffer>> args = valuesToKernelArgs(cdr<value>(expr), kernel, cl, cq); if (!hasContent(args)) { - return mkfailure<value>(reason(args)); + return mkfailure<value>(args); } // Allocate result buffer in device memory @@ -618,13 +618,13 @@ const failable<value> evalKernel(const f const size_t rsize = rtype.n * rtype.size; const failable<OpenCLBuffer> rbuf = writeOnlyBuffer(rsize, cl); if (!hasContent(rbuf)) - return mkfailure<value>(reason(rbuf)); + return mkfailure<value>(rbuf); // Set it as a kernel output arg const cl_mem rmem = content(rbuf).mem; const failable<OpenCLBuffer> rarg = valueToKernelArg((cl_uint)length(cdr<value>(expr)), sizeof(cl_mem), &rmem, rbuf, kernel); if (!hasContent(rarg)) - return mkfailure<value>(reason(rarg)); + return mkfailure<value>(rarg); // Enqueue the kernel, to be executed after all the writes complete cl_event wevt[32]; @@ -715,7 +715,7 @@ const failable<OpenCLProgram> readProgra const failable<value> evalKernel(const value& expr, istream& is, const OpenCLContext& cl) { failable<OpenCLProgram> clprog = readProgram("program.cl", is, cl); if (!hasContent(clprog)) - return mkfailure<value>(reason(clprog)); + return mkfailure<value>(clprog); return evalKernel(createKernel(expr, content(clprog)), expr, 1, value::Nil, 0, cl); } Modified: tuscany/sca-cpp/trunk/modules/opencl/server-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/opencl/server-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/opencl/server-test (original) +++ tuscany/sca-cpp/trunk/modules/opencl/server-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 ../server/htdocs ../server/server-conf tmp ./opencl-conf tmp Modified: tuscany/sca-cpp/trunk/modules/openid/start-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/openid/start-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/openid/start-test (original) +++ tuscany/sca-cpp/trunk/modules/openid/start-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ../../components/cache/memcached-start tmp 11212 ../../components/cache/memcached-start tmp 11213 Modified: tuscany/sca-cpp/trunk/modules/python/mod-python.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/mod-python.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/python/mod-python.cpp (original) +++ tuscany/sca-cpp/trunk/modules/python/mod-python.cpp Mon May 28 04:39:18 2012 @@ -73,6 +73,8 @@ const failable<lambda<value(const list<v } if (contains(itype, ".cpp")) return modcpp::evalImplementation(path, impl, px); + if (contains(itype, ".widget")) + return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype, -1, false); return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype); } Modified: tuscany/sca-cpp/trunk/modules/python/mod-python.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/mod-python.hpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/python/mod-python.hpp (original) +++ tuscany/sca-cpp/trunk/modules/python/mod-python.hpp Mon May 28 04:39:18 2012 @@ -52,7 +52,7 @@ struct applyImplementation { const value expr = append<value>(params, px); debug(expr, "modeval::python::applyImplementation::input"); const failable<value> res = python::evalScript(expr, impl, py); - const value val = !hasContent(res)? mklist<value>(value(), reason(res)) : mklist<value>(content(res)); + const value val = !hasContent(res)? mklist<value>(value(), reason(res), rcode(res)) : mklist<value>(content(res)); debug(val, "modeval::python::applyImplementation::result"); return val; } @@ -70,7 +70,7 @@ const failable<lambda<value(const list<v return mkfailure<lambda<value(const list<value>&)> >(string("Could not read implementation: ") + fpath); const failable<PyObject*> script = python::readScript(python::moduleName(spath), fpath, is, py); if (!hasContent(script)) - return mkfailure<lambda<value(const list<value>&)> >(reason(script)); + return mkfailure<lambda<value(const list<value>&)> >(script); return lambda<value(const list<value>&)>(applyImplementation(content(script), px, py)); } Modified: tuscany/sca-cpp/trunk/modules/python/server-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/server-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/python/server-test (original) +++ tuscany/sca-cpp/trunk/modules/python/server-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 ../server/htdocs ../http/httpd-event-conf tmp ../server/server-conf tmp Modified: tuscany/sca-cpp/trunk/modules/python/wiring-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/wiring-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/python/wiring-test (original) +++ tuscany/sca-cpp/trunk/modules/python/wiring-test Mon May 28 04:39:18 2012 @@ -22,6 +22,7 @@ here=`echo "import os; print os.path.rea curl_prefix=`cat $here/../http/curl.prefix` # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 ../server/htdocs ../http/httpd-event-conf tmp ../server/server-conf tmp Modified: tuscany/sca-cpp/trunk/modules/scheme/json-value.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/json-value.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/scheme/json-value.cpp (original) +++ tuscany/sca-cpp/trunk/modules/scheme/json-value.cpp Mon May 28 04:39:18 2012 @@ -36,7 +36,7 @@ int jsonValue() { const js::JSContext cx; const failable<list<value> > lv = json::readJSON(streamList(cin), cx); if (!hasContent(lv)) { - cerr << reason(lv); + cerr << reason(lv) << " : " << rcode(lv); return 1; } cout << writeValue(content(lv)); Modified: tuscany/sca-cpp/trunk/modules/scheme/value-json.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/value-json.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/scheme/value-json.cpp (original) +++ tuscany/sca-cpp/trunk/modules/scheme/value-json.cpp Mon May 28 04:39:18 2012 @@ -36,7 +36,7 @@ int valueJSON() { const js::JSContext cx; failable<list<string> > s = json::writeJSON(readValue(cin), cx); if (!hasContent(s)) { - cerr << reason(s); + cerr << reason(s) << " : " << rcode(s); return 1; } write(content(s), cout); Modified: tuscany/sca-cpp/trunk/modules/scheme/value-xml.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/value-xml.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/scheme/value-xml.cpp (original) +++ tuscany/sca-cpp/trunk/modules/scheme/value-xml.cpp Mon May 28 04:39:18 2012 @@ -35,7 +35,7 @@ namespace scheme { int valueXML() { failable<list<string> > s = writeXML(readValue(cin)); if (!hasContent(s)) { - cerr << reason(s); + cerr << reason(s) << " : " << rcode(s); return 1; } write(content(s), cout); Modified: tuscany/sca-cpp/trunk/modules/server/httpd-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/httpd-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/httpd-test (original) +++ tuscany/sca-cpp/trunk/modules/server/httpd-test Mon May 28 04:39:18 2012 @@ -22,6 +22,7 @@ here=`echo "import os; print os.path.rea curl_prefix=`cat $here/../http/curl.prefix` # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 htdocs ../http/httpd-event-conf tmp ./server-conf tmp Modified: tuscany/sca-cpp/trunk/modules/server/mod-eval.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-eval.cpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/mod-eval.cpp (original) +++ tuscany/sca-cpp/trunk/modules/server/mod-eval.cpp Mon May 28 04:39:18 2012 @@ -55,6 +55,8 @@ const failable<lambda<value(const list<v return modscheme::evalImplementation(path, impl, px); if (contains(itype, ".cpp")) return modcpp::evalImplementation(path, impl, px); + if (contains(itype, ".widget")) + return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype, -1, false); return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype); } Modified: tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp (original) +++ tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp Mon May 28 04:39:18 2012 @@ -151,7 +151,7 @@ public: const failable<value> failableResult(const list<value>& v) { if (isNil(cdr(v))) return car(v); - return mkfailure<value>(string(cadr(v)), false); + return mkfailure<value>(string(cadr(v)), isNil(cddr(v))? -1 : (int)caddr(v), false); } /** @@ -191,7 +191,7 @@ public: } const value callImpl(const value& cname, const list<value>& aparams) const { - debug(impls, "modeval::implProxy::callImpl::impls"); + //debug(impls, "modeval::implProxy::callImpl::impls"); // Lookup the component implementation const list<value> impl(assoctree<value>(cname, impls)); @@ -345,9 +345,11 @@ struct hostPropProxy { hostPropProxy(const value& v) : v(v) { } const value operator()(unused const list<value>& params) const { - const value r = httpd::hostName(currentRequest, v); - debug(r, "modeval::hostPropProxy::value"); - return r; + if (currentRequest == NULL) + return http::hostName(); + const value h = httpd::hostName(currentRequest, v); + debug(h, "modeval::hostPropProxy::value"); + return h; } }; @@ -356,6 +358,8 @@ struct appPropProxy { appPropProxy(const value& v) : v(v) { } const value operator()(unused const list<value>& params) const { + if (currentRequest == NULL) + return v; const RequestConf& reqc = httpd::requestConf<RequestConf>(currentRequest, &mod_tuscany_eval); const value a = isNil(reqc.vpath)? v : car(reqc.vpath); debug(a, "modeval::appPropProxy::value"); @@ -364,23 +368,29 @@ struct appPropProxy { }; struct pathPropProxy { - pathPropProxy(unused const value& v) { + const value v; + pathPropProxy(const value& v) : v(v) { } const value operator()(unused const list<value>& params) const { + if (currentRequest == NULL) + return v; const RequestConf& reqc = httpd::requestConf<RequestConf>(currentRequest, &mod_tuscany_eval); - const value v = reqc.rpath; - debug(v, "modeval::pathPropProxy::value"); - return v; + const value p = reqc.rpath; + debug(p, "modeval::pathPropProxy::value"); + return p; } }; struct queryPropProxy { - queryPropProxy(unused const value& v) { + const value v; + queryPropProxy(const value& v) : v(v) { } const value operator()(unused const list<value>& params) const { - const value v = httpd::unescapeArgs(httpd::queryArgs(currentRequest)); - debug(v, "modeval::queryPropProxy::value"); - return v; + if (currentRequest == NULL) + return v; + const value q = httpd::unescapeArgs(httpd::queryArgs(currentRequest)); + debug(q, "modeval::queryPropProxy::value"); + return q; } }; @@ -390,10 +400,34 @@ struct envPropProxy { envPropProxy(const string& name, const value& v) : name(name), v(v) { } const value operator()(unused const list<value>& params) const { + if (currentRequest == NULL) + return v; const char* env = apr_table_get(currentRequest->subprocess_env, c_str(name)); if (env == NULL || *env == '\0') return v; - return string(env); + debug(name, "modeval::envPropProxy::name"); + const value e = string(env); + debug(e, "modeval::envPropProxy::value"); + return e; + } +}; + +struct realmPropProxy { + const value v; + realmPropProxy(const value& v) : v(v) { + } + const value operator()(unused const list<value>& params) const { + if (currentRequest == NULL) + return v; + const char* env = apr_table_get(currentRequest->subprocess_env, "REALM"); + if (env == NULL) + return v; + const char* realm = strncmp(env, "www.", 4) == 0? env + 4 : env; + if (*realm == '\0') + return v; + const value r = string(realm); + debug(r, "modeval::realmPropProxy::value"); + return r; } }; @@ -402,9 +436,13 @@ struct userPropProxy { userPropProxy(const value& v) : v(v) { } const value operator()(unused const list<value>& params) const { + if (currentRequest == NULL) + return v; if (currentRequest->user == NULL) return v; - return string(currentRequest->user); + const value u = string(currentRequest->user); + debug(u, "modeval::userPropProxy::value"); + return u; } }; @@ -422,7 +460,7 @@ const value mkpropProxy(const value& pro if (n == "user") return lambda<value(const list<value>&)>(userPropProxy(v)); if (n == "realm") - return lambda<value(const list<value>&)>(envPropProxy("REALM", v)); + return lambda<value(const list<value>&)>(realmPropProxy(v)); if (n == "email") return lambda<value(const list<value>&)>(envPropProxy("EMAIL", v)); if (n == "nickname") @@ -508,13 +546,13 @@ const failable<list<value> > readCompone const failable<list<value> > getComponents(const lambda<value(const list<value>&)>& provider, const string& name) { const failable<value> val = failableResult(provider(cons<value>("get", mklist<value>(mklist<value>(name))))); if (!hasContent(val)) - return mkfailure<list<value> >(reason(val)); + return mkfailure<list<value> >(val); const list<value> c = assoc<value>(value("content"), (list<list<value> >)cdr<value>(content(val))); if (isNil(c)) return mkfailure<list<value> >(string("Could not get composite: ") + name); const failable<list<string> > x = writeXML(car<value>(valuesToElements(mklist<value>(mklist<value>(cadr(c)))))); if (!hasContent(x)) - return mkfailure<list<value> >(reason(x)); + return mkfailure<list<value> >(x); return scdl::components(readXML(content(x))); } @@ -530,7 +568,7 @@ const failable<list<value> > applyLifecy const lambda<value(const list<value>&)> l = cadr<value>(car(impls)); const failable<value> r = failableResult(l(expr)); if (!hasContent(r)) - return mkfailure<list<value> >(reason(r)); + return mkfailure<list<value> >(r); const lambda<value(const list<value>&)> rl = content(r); // Use the returned lambda function, if any, from now on @@ -604,7 +642,7 @@ const failable<Composite> confComponents readComponents(scdl::resourcePath(length(vhost) != 0? contribPath + vhost + "/" : contribPath, composName)) : getComponents(provider, vhost); if (!hasContent(fcomps)) - return mkfailure<Composite>(reason(fcomps)); + return mkfailure<Composite>(fcomps); const list<value> comps = content(fcomps); debug(comps, "modeval::confComponents::comps"); @@ -630,7 +668,7 @@ const failable<list<value> > startCompon debug(flatten(impls), "modeval::startComponents::impls"); const failable<list<value> > fsimpls = applyLifecycleExpr(flatten(impls), mklist<value>("start")); if (!hasContent(fsimpls)) - return mkfailure<list<value> >(reason(fsimpls)); + return mkfailure<list<value> >(fsimpls); const list<value> simpls = content(fsimpls); debug(impls, "modeval::startComponents::simpls"); @@ -667,7 +705,7 @@ const failable<int> get(const list<value // Apply the requested function const failable<value> val = failableResult(impl(cons(func, json::queryParams(args)))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); // Return JSON result js::JSContext cx; @@ -678,7 +716,7 @@ const failable<int> get(const list<value const list<value> params(cddr(rpath)); const failable<value> val = failableResult(impl(cons<value>("get", mklist<value>(params)))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); const value c = content(val); debug(c, "modeval::get::content"); @@ -776,7 +814,7 @@ const failable<int> post(const list<valu // Evaluate the request expression const failable<value> val = failableResult(impl(cons<value>(func, params))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); // Return JSON result return httpd::writeResult(json::jsonResult(id, content(val), cx), "application/json-rpc; charset=utf-8", r); @@ -796,7 +834,7 @@ const failable<int> post(const list<valu // Evaluate the POST expression const failable<value> val = failableResult(impl(cons<value>("post", mklist<value>(cddr(rpath), aval)))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); // Return the created resource location debug(content(val), "modeval::post::location"); @@ -809,7 +847,7 @@ const failable<int> post(const list<valu // the component implementation function const failable<value> val = failableResult(impl(cons<value>("handle", mklist<value>(httpd::requestValue(r))))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); return (int)content(val); } @@ -830,7 +868,7 @@ const failable<int> put(const list<value // Evaluate the PUT expression and update the corresponding resource const failable<value> val = failableResult(impl(cons<value>("put", mklist<value>(cddr(rpath), aval)))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); if (val == value(false)) return HTTP_NOT_FOUND; return OK; @@ -845,7 +883,7 @@ const failable<int> del(const list<value // Evaluate an ATOM delete request const failable<value> val = failableResult(impl(cons<value>("delete", mklist<value>(cddr(rpath))))); if (!hasContent(val)) - return mkfailure<int>(reason(val)); + return mkfailure<int>(val); if (val == value(false)) return HTTP_NOT_FOUND; return OK; @@ -854,7 +892,12 @@ const failable<int> del(const list<value /** * Proceed to handle a service component request. */ -int proceedToHandler(request_rec* r, const bool valias, const list<value>& rpath, const list<value>& vpath, const list<value>& impls) { +int proceedToHandler(request_rec* r, const int rc) { + r->handler = "mod_tuscany_eval"; + return rc; +} + +int proceedToHandler(request_rec* r, const int rc, const bool valias, const list<value>& rpath, const list<value>& vpath, const list<value>& impls) { r->handler = "mod_tuscany_eval"; r->filename = apr_pstrdup(r->pool, c_str(string("/redirect:") + r->uri)); @@ -864,7 +907,7 @@ int proceedToHandler(request_rec* r, con reqc.rpath = rpath; reqc.vpath = vpath; reqc.impls = impls; - return OK; + return rc; } /** @@ -882,7 +925,7 @@ int translateComponent(request_rec *r, c return HTTP_NOT_FOUND; debug(impl, "modeval::translateComponent::impl"); - return proceedToHandler(r, false, rpath, vpath, impls);; + return proceedToHandler(r, OK, false, rpath, vpath, impls);; } /** @@ -928,7 +971,7 @@ int translateReference(request_rec *r, c const value tname = substr(target, 0, find(target, '/')); const list<value> redir = cons<value>(string("c"), cons(tname, pathInfo)); debug(redir, "modeval::translateReference::redirect"); - return proceedToHandler(r, false, redir, vpath, impls);; + return proceedToHandler(r, OK, false, redir, vpath, impls);; } /** @@ -973,7 +1016,7 @@ int translateService(request_rec *r, con // / c / target component name / request path info const list<value> redir = cons<value>(string("c"), cons<value>(cadr(svc), httpd::pathInfo(rpath, car(svc)))); debug(redir, "modeval::translateService::redirect"); - return proceedToHandler(r, false, redir, vpath, impls); + return proceedToHandler(r, OK, false, redir, vpath, impls); } /** @@ -986,15 +1029,15 @@ const int translateRequest(request_rec* // Translate a component request if ((prefix == string("components") || prefix == string("c")) && translateComponent(r, rpath, vpath, impls) == OK) - return OK; + return proceedToHandler(r, OK); // Translate a component reference request if ((prefix == string("references") || prefix == string("r")) && translateReference(r, rpath, vpath, refs, impls) == OK) - return OK; + return proceedToHandler(r, OK); // Attempt to translate the request to a service request if (translateService(r, rpath, vpath, svcs, impls) == OK) - return OK; + return proceedToHandler(r, OK); // Attempt to map a request targeting the main host to an actual file if (isNil(vpath)) { @@ -1019,15 +1062,14 @@ const int translateRequest(request_rec* if (isNil(rpath) && r->uri[strlen(r->uri) - 1] != '/') { const string target = string(r->uri) + string("/") + (r->args != NULL? string("?") + string(r->args) : string("")); debug(target, "modeval::translateRequest::location"); - r->handler = "mod_tuscany_eval"; - return httpd::externalRedirect(target, r); + return proceedToHandler(r, httpd::externalRedirect(target, r)); } // If the request didn't match a service, reference or component, // redirect it to / v / app / path. This will allow mapping to // the actual app resource using HTTPD aliases. debug(true, "modeval::translateRequest::valias"); - return proceedToHandler(r, true, rpath, vpath, impls); + return proceedToHandler(r, OK, true, rpath, vpath, impls); } return HTTP_NOT_FOUND; @@ -1093,7 +1135,6 @@ int translate(request_rec *r) { reqc.impls = vcompos.impls; return translateRequest(r, cdr(rpath), mklist<value>(vname), vcompos.refs, vcompos.svcs, reqc.impls); } - return DECLINED; } @@ -1129,15 +1170,18 @@ const int handleRequest(const list<value * HTTP request handler. */ int handler(request_rec *r) { - if(r->method_number != M_GET && r->method_number != M_POST && r->method_number != M_PUT && r->method_number != M_DELETE) + if (r->handler != NULL && r->handler[0] != '\0') return DECLINED; + + // Attempt to translate the request + const int trc = translate(r); + + // Pass if we couldn't translate the request + if(trc != OK) + return trc; if(strcmp(r->handler, "mod_tuscany_eval")) return DECLINED; - // Nothing to do for an external redirect - if (r->status == HTTP_MOVED_TEMPORARILY) - return OK; - // Create a scoped memory pool and a scope for the current request gc_scoped_pool pool(r->pool); ScopedRequest sr(r); @@ -1397,7 +1441,6 @@ void registerHooks(unused apr_pool_t *p) ap_hook_post_config(postConfig, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init(childInit, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_handler(handler, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_translate_name(translate, NULL, NULL, APR_HOOK_LAST); } } Modified: tuscany/sca-cpp/trunk/modules/server/server-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/server-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/server-test (original) +++ tuscany/sca-cpp/trunk/modules/server/server-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 htdocs ../http/httpd-event-conf tmp ./server-conf tmp Modified: tuscany/sca-cpp/trunk/modules/server/wiring-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/wiring-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/wiring-test (original) +++ tuscany/sca-cpp/trunk/modules/server/wiring-test Mon May 28 04:39:18 2012 @@ -22,6 +22,7 @@ here=`echo "import os; print os.path.rea curl_prefix=`cat $here/../http/curl.prefix` # Setup +rm -rf tmp ../http/httpd-conf tmp localhost 8090 htdocs ../http/httpd-event-conf tmp ./server-conf tmp Modified: tuscany/sca-cpp/trunk/modules/wsgi/gae-stop URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/gae-stop?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/wsgi/gae-stop (original) +++ tuscany/sca-cpp/trunk/modules/wsgi/gae-stop Mon May 28 04:39:18 2012 @@ -26,4 +26,8 @@ python_prefix=`cat $here/../python/pytho gae_prefix=`cat $here/gae.prefix` py="$python_prefix/bin/python $gae_prefix/dev_appserver.py -a 0.0.0.0 -p $port $root" -kill `ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +k=`ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +if [ "$k" != "" ]; then + kill $k +fi + Modified: tuscany/sca-cpp/trunk/modules/wsgi/http-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/http-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/wsgi/http-test (original) +++ tuscany/sca-cpp/trunk/modules/wsgi/http-test Mon May 28 04:39:18 2012 @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp mkdir -p tmp ./wsgi-start target 8090 2>/dev/null sleep 2 @@ -25,6 +26,8 @@ sleep 2 # Test JSON-RPC here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` python_prefix=`cat $here/../python/python.prefix` +export LD_LIBRARY_PATH=$python_prefix/lib:$LD_LIBRARY_PATH + $python_prefix/bin/python http-test.py rc=$? Modified: tuscany/sca-cpp/trunk/modules/wsgi/util-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/util-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/wsgi/util-test (original) +++ tuscany/sca-cpp/trunk/modules/wsgi/util-test Mon May 28 04:39:18 2012 @@ -20,6 +20,7 @@ # Run Python util test cases here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` python_prefix=`cat $here/../python/python.prefix` +export LD_LIBRARY_PATH=$python_prefix/lib:$LD_LIBRARY_PATH $python_prefix/bin/python stream-test.py rc=$? Modified: tuscany/sca-cpp/trunk/modules/wsgi/wiring-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/wiring-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/wsgi/wiring-test (original) +++ tuscany/sca-cpp/trunk/modules/wsgi/wiring-test Mon May 28 04:39:18 2012 @@ -26,6 +26,7 @@ if [ "$uri" = "" ]; then fi # Setup +rm -rf tmp mkdir -p tmp ./wsgi-start target 8090 2>/dev/null sleep 2 Modified: tuscany/sca-cpp/trunk/modules/wsgi/wsgi-stop URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/wsgi-stop?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/wsgi/wsgi-stop (original) +++ tuscany/sca-cpp/trunk/modules/wsgi/wsgi-stop Mon May 28 04:39:18 2012 @@ -25,4 +25,8 @@ port=$2 python_prefix=`cat $here/../python/python.prefix` py="$python_prefix/bin/python composite.py $port" -kill `ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +k=`ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +if [ "$k" != "" ]; then + kill $k +fi + Modified: tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test (original) +++ tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test Mon May 28 04:39:18 2012 @@ -22,6 +22,7 @@ here=`echo "import os; print os.path.rea curl_prefix=`cat $here/../http/curl.prefix` # Setup +rm -rf tmp mkdir -p tmp ./wsgi-start target 8090 2>/dev/null sleep 2 Modified: tuscany/sca-cpp/trunk/samples/store-cluster/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-cluster/start (original) +++ tuscany/sca-cpp/trunk/samples/store-cluster/start Mon May 28 04:39:18 2012 @@ -26,6 +26,7 @@ sudo ../../ubuntu/ip-redirect-all 80 809 #sudo ../../ubuntu/ip-redirect-all 80 8091 # Start scribe logging +rm -rf tmp ../../components/log/scribed-central-conf tmp/monitor ../../components/log/scribed-client-conf tmp/monitor localhost ../../components/log/scribed-central-start tmp/monitor Modified: tuscany/sca-cpp/trunk/samples/store-constdb/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-constdb/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-constdb/start (original) +++ tuscany/sca-cpp/trunk/samples/store-constdb/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 htdocs ../../modules/http/httpd-event-conf tmp ../../modules/server/server-conf tmp Modified: tuscany/sca-cpp/trunk/samples/store-cpp/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-cpp/start (original) +++ tuscany/sca-cpp/trunk/samples/store-cpp/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 htdocs ../../modules/http/httpd-event-conf tmp ../../modules/server/server-conf tmp Modified: tuscany/sca-cpp/trunk/samples/store-gae/server-test URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-gae/server-test?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-gae/server-test (original) +++ tuscany/sca-cpp/trunk/samples/store-gae/server-test Mon May 28 04:39:18 2012 @@ -26,6 +26,7 @@ curl_prefix=`cat $here/../../modules/htt sleep 2 # Test HTTP GET (with authentication) +rm -rf tmp mkdir -p tmp $curl_prefix/bin/curl -L -c tmp/cookies.txt -b tmp/cookies.txt "http://localhost:8090/_ah/[email protected]&action=Login&continue=http://localhost:8090/" 2>/dev/null >tmp/index.html diff tmp/index.html htdocs/index.html Modified: tuscany/sca-cpp/trunk/samples/store-java/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-java/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-java/start (original) +++ tuscany/sca-cpp/trunk/samples/store-java/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 htdocs ../../modules/server/server-conf tmp ../../modules/java/java-conf tmp Modified: tuscany/sca-cpp/trunk/samples/store-python/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-python/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-python/start (original) +++ tuscany/sca-cpp/trunk/samples/store-python/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 htdocs ../../modules/http/httpd-event-conf tmp ../../modules/server/server-conf tmp Modified: tuscany/sca-cpp/trunk/samples/store-scheme/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-scheme/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-scheme/start (original) +++ tuscany/sca-cpp/trunk/samples/store-scheme/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 htdocs ../../modules/http/httpd-event-conf tmp ../../modules/server/server-conf tmp Modified: tuscany/sca-cpp/trunk/samples/store-sql/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-sql/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-sql/start (original) +++ tuscany/sca-cpp/trunk/samples/store-sql/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 htdocs ../../modules/http/httpd-event-conf tmp ../../modules/server/server-conf tmp Modified: tuscany/sca-cpp/trunk/samples/store-vhost/start URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-vhost/start?rev=1343138&r1=1343137&r2=1343138&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/samples/store-vhost/start (original) +++ tuscany/sca-cpp/trunk/samples/store-vhost/start Mon May 28 04:39:18 2012 @@ -17,6 +17,7 @@ # specific language governing permissions and limitations # under the License. +rm -rf tmp ../../modules/http/httpd-conf tmp example.com 8090 htdocs ../../modules/http/httpd-event-conf tmp ../../modules/http/vhost-conf tmp domains htdocs
