service metadata takes into account request protocol

This is about #37 .
I added a property "protocol" to the global config array and initialize it in the router class (not sure this is the right place).