From: Felix Fietkau Date: Fri, 26 Jul 2013 11:25:06 +0000 (+0200) Subject: detect chrome before safari, chrome includes Safari/ in the UA header X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=37ea780f269d189e98dbafe7654f83bf35c8a940;p=oweals%2Fuhttpd.git detect chrome before safari, chrome includes Safari/ in the UA header Signed-off-by: Felix Fietkau --- 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"))