From 37ea780f269d189e98dbafe7654f83bf35c8a940 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 26 Jul 2013 13:25:06 +0200 Subject: [PATCH] detect chrome before safari, chrome includes Safari/ in the UA header Signed-off-by: Felix Fietkau --- client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client.c b/client.c index 9d0ccb7..173285a 100644 --- a/client.c +++ b/client.c @@ -312,10 +312,11 @@ static void client_parse_header(struct client *cl, char *data) break; } } - } else if (strstr(val, "Safari/") && strstr(val, "Mac OS X")) - r->ua = UH_UA_SAFARI; + } else if (strstr(val, "Chrome/")) r->ua = UH_UA_CHROME; + else if (strstr(val, "Safari/") && strstr(val, "Mac OS X")) + r->ua = UH_UA_SAFARI; else if (strstr(val, "Gecko/")) r->ua = UH_UA_GECKO; else if (strstr(val, "Konqueror")) -- 2.25.1