detect server type for encoding