Fixed problem identifying OAuth request protocol

The protocol of a OAuth request wasn't being identified correctly. It
always considered that the request protocol was https.