var Hapi = require('hapi'),
	Utils = require('./lib/utils.js'),
	config = require('./config.js'),
	server = new Hapi.Server(),
	sc = config.sc;

server.connection({port: config.port});

server.route({
	method: 'GET',
	path: '/',
	handler: function(request, reply){
		var r = {response: sc};

		Utils.requestFormatter(request, r).dilate(request, r, 'gran');
		return reply(JSON.stringify(r)).type('application/json');
	}
});

server.route({
	method: 'GET',
	path: '/caps',
	handler: function(request, reply){
		var r = {response: sc.toUpperCase()};

		r = Utils.requestFormatter(request, r).dilate(request, r, 'GRAN');
		return reply(JSON.stringify(r)).type('application/json');
	}
});

server.route({
	method: 'GET',
	path: '/camel',
	handler: function(request, reply){
		var r = {response: "StoCazzo"};

		r = Utils.requestFormatter(request, r).dilate(request, r, 'Gran');
		return reply(JSON.stringify(r)).type('application/json');
	}
});

server.route({
	method: 'GET',
	path: '/ascii',
	handler: function(request, reply){
		var r = {response: "8====D"};

		r = Utils.requestFormatter(request, r);
		return reply(JSON.stringify(r)).type('application/json');
	}
});

server.start(function () {
	console.log('A stocazzo provider is running at:', server.info.uri);
});

exports.server = server;

@@ -540,28 +540,24 @@
 Case()%7D;%0A%0A%09%09
-r = 
 Utils.reques
@@ -603,24 +603,24 @@
 r, 'GRAN');%0A
+
 %09%09return rep
@@ -792,28 +792,24 @@
 Cazzo%22%7D;%0A%0A%09%09
-r = 
 Utils.reques
@@ -1046,20 +1046,16 @@
 D%22%7D;%0A%0A%09%09
-r = 
 Utils.re
@@ -1080,16 +1080,42 @@
 uest, r)
+.dilate(request, r, '===')
 ;%0A%09%09retu

support for stograncazzo in ascii