Skip to content
Snippets Groups Projects
Commit 06e99f82 authored by srosse's avatar srosse
Browse files

OO-4515: make the user agent check for outlook more generic

parent 87f3cb3d
No related branches found
No related tags found
No related merge requests found
...@@ -343,7 +343,7 @@ public class ICalServlet extends HttpServlet { ...@@ -343,7 +343,7 @@ public class ICalServlet extends HttpServlet {
String userAgent = request.getHeader("User-Agent"); String userAgent = request.getHeader("User-Agent");
if(userAgent == null) { if(userAgent == null) {
return Agent.unkown; return Agent.unkown;
} else if(userAgent.indexOf("Microsoft Outlook") >= 0 || userAgent.indexOf("Microsoft Office") >= 0 } else if(userAgent.indexOf("Microsoft ") >= 0 // to catch "Microsoft Outlook", "Microsoft Office", "Microsoft Exchange" which are all user agents used by outlook.com
|| userAgent.equals("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)")) {// <- this is the user agent of Outlook live || userAgent.equals("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)")) {// <- this is the user agent of Outlook live
return Agent.outlook; return Agent.outlook;
} else if(userAgent.indexOf("Google") >= 0 && userAgent.indexOf("Calendar") >= 0) { } else if(userAgent.indexOf("Google") >= 0 && userAgent.indexOf("Calendar") >= 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment