summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-07-26 13:25:06 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-07-26 13:25:06 +0200
commit37ea780f269d189e98dbafe7654f83bf35c8a940 (patch)
tree6175c5a6661366575a4fa538245788bc6bea3e60 /client.c
parent135afd6343e524cb4fb0e6579cc3447531a401fa (diff)
detect chrome before safari, chrome includes Safari/ in the UA header
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'client.c')
-rw-r--r--client.c5
1 files 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"))