switch on protocol & whitespace