summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/curl-test.cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-03-27 06:24:56 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-03-27 06:24:56 +0000
commitd64a280c20229e374684e9b5e392fdf878ed5514 (patch)
treebd0edee43d0f6569824a3d3d38960a5602c58da8 /sca-cpp/trunk/modules/http/curl-test.cpp
parentdac887d0f494151b210588ce694c55ce27f07263 (diff)
Add scripts to setup HTTPS support. A few fixes to get HTTPS working end to end with both HTTPD and WSGI servers. Minor cleanup of the HTTPD config scripts.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@928160 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/http/curl-test.cpp')
-rw-r--r--sca-cpp/trunk/modules/http/curl-test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/http/curl-test.cpp b/sca-cpp/trunk/modules/http/curl-test.cpp
index 4305d2ac38..c9b85ad962 100644
--- a/sca-cpp/trunk/modules/http/curl-test.cpp
+++ b/sca-cpp/trunk/modules/http/curl-test.cpp
@@ -32,6 +32,8 @@
namespace tuscany {
namespace http {
+string testURI = "http://localhost:8090";
+
ostream* curlWriter(const string& s, ostream* os) {
(*os) << s;
return os;
@@ -41,13 +43,13 @@ const bool testGet() {
CURLSession ch;
{
ostringstream os;
- const failable<list<ostream*> > r = get<ostream*>(curlWriter, &os, "http://localhost:8090", ch);
+ const failable<list<ostream*> > r = get<ostream*>(curlWriter, &os, testURI, ch);
assert(hasContent(r));
assert(contains(str(os), "HTTP/1.1 200 OK"));
assert(contains(str(os), "It works"));
}
{
- const failable<value> r = getcontent("http://localhost:8090", ch);
+ const failable<value> r = getcontent(testURI, ch);
assert(hasContent(r));
assert(contains(car(reverse(list<value>(content(r)))), "It works"));
}
@@ -59,7 +61,7 @@ struct getLoop {
getLoop(CURLSession& ch) : ch(ch) {
}
const bool operator()() const {
- const failable<value> r = getcontent("http://localhost:8090", ch);
+ const failable<value> r = getcontent(testURI, ch);
assert(hasContent(r));
assert(contains(car(reverse(list<value>(content(r)))), "It works"));
return true;
@@ -78,6 +80,7 @@ const bool testGetPerf() {
int main() {
tuscany::cout << "Testing..." << tuscany::endl;
+ tuscany::http::testURI = tuscany::string("http://") + tuscany::http::hostname() + ":8090";
tuscany::http::testGet();
tuscany::http::testGetPerf();