Use protocol.ARGUMENT_SEPARATOR.search instead of checking for spaces.