Sets path and protocol when parsins request