summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-09-25 14:28:13 -0700
committerCorey Hulen <corey@hulen.com>2015-09-25 14:28:13 -0700
commitedd99e243f0688a1bae2613558438d78e492c9b8 (patch)
tree1ee8b624f209ff921e96b3abf2ae252bd6ad1a6b /Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
parent63960fae0996c3dc09a55efab9654893190460d9 (diff)
parent8b63ca03ea3b1f005ee3b8ec516f30fd035d52cb (diff)
downloadchat-edd99e243f0688a1bae2613558438d78e492c9b8.tar.gz
chat-edd99e243f0688a1bae2613558438d78e492c9b8.tar.bz2
chat-edd99e243f0688a1bae2613558438d78e492c9b8.zip
Merge pull request #812 from hmhealey/plt256
PLT-256 Add headers to getFile api calls from IE/Edge to trigger file download
Diffstat (limited to 'Godeps/_workspace/src/github.com/mssola/user_agent/browser.go')
-rw-r--r--Godeps/_workspace/src/github.com/mssola/user_agent/browser.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go b/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
index 9fb27e5f3..c5612db7b 100644
--- a/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
+++ b/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
@@ -48,13 +48,21 @@ func (p *UserAgent) detectBrowser(sections []section) {
if slen > 2 {
p.browser.Version = sections[2].version
if engine.name == "AppleWebKit" {
- if sections[slen-1].name == "OPR" {
+ switch sections[slen-1].name {
+ case "Edge":
+ p.browser.Name = "Edge"
+ p.browser.Version = sections[slen-1].version
+ p.browser.Engine = "EdgeHTML"
+ p.browser.EngineVersion = ""
+ case "OPR":
p.browser.Name = "Opera"
p.browser.Version = sections[slen-1].version
- } else if sections[2].name == "Chrome" {
- p.browser.Name = "Chrome"
- } else {
- p.browser.Name = "Safari"
+ default:
+ if sections[2].name == "Chrome" {
+ p.browser.Name = "Chrome"
+ } else {
+ p.browser.Name = "Safari"
+ }
}
} else if engine.name == "Gecko" {
name := sections[2].name