test redirection
authorpaulr <paulr@tv.pjr.cc>
Fri, 21 Dec 2012 09:21:03 +0000 (20:21 +1100)
committerpaulr <paulr@tv.pjr.cc>
Fri, 21 Dec 2012 09:21:03 +0000 (20:21 +1100)
lib/purls/web_body.js [new file with mode: 0644]
lib/purls/web_isbase.js [new file with mode: 0644]
lib/purls/web_nobody.js [new file with mode: 0644]
lib/purls/web_test.js [new file with mode: 0644]

diff --git a/lib/purls/web_body.js b/lib/purls/web_body.js
new file mode 100644 (file)
index 0000000..c9671ed
--- /dev/null
@@ -0,0 +1,8 @@
+function process(request, response, callback) {
+       response.write("Body");
+       callback(request, response);
+}
+
+
+exports.process = process;
+exports.requireBody = function() { return true;};
diff --git a/lib/purls/web_isbase.js b/lib/purls/web_isbase.js
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/purls/web_nobody.js b/lib/purls/web_nobody.js
new file mode 100644 (file)
index 0000000..67eef07
--- /dev/null
@@ -0,0 +1,8 @@
+function process(request, response, callback) {
+       response.writeHead(302, { 'Location':'/body/'})
+       callback(request, response);
+}
+
+
+exports.process = process;
+exports.requireBody = function() { return false;};
diff --git a/lib/purls/web_test.js b/lib/purls/web_test.js
new file mode 100644 (file)
index 0000000..e746be5
--- /dev/null
@@ -0,0 +1,11 @@
+function requireBody() {
+       return true;
+}
+
+function process(request, response, callback) {
+       response.write("from callback<br>");
+       callback(request, response);
+}
+
+exports.requireBody = requireBody;
+exports.process = process;