rewrite request URL if using protobuf
enable protobuf if asked to do so
only set content-type once