detect chrome before safari, chrome includes Safari/ in the UA header
authorFelix Fietkau <nbd@openwrt.org>
Fri, 26 Jul 2013 11:25:06 +0000 (13:25 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 26 Jul 2013 11:25:06 +0000 (13:25 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
client.c

index 9d0ccb7492e2e899fdcb5ca097e850298f752a96..173285a7bd7a9fa94e2018bc7f30edb32d1c9ffa 100644 (file)
--- 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"))