detect user-agent header