diff options
author | Corey Hulen <corey@hulen.com> | 2015-09-25 14:28:13 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-09-25 14:28:13 -0700 |
commit | edd99e243f0688a1bae2613558438d78e492c9b8 (patch) | |
tree | 1ee8b624f209ff921e96b3abf2ae252bd6ad1a6b /Godeps/_workspace/src/github.com/mssola/user_agent/browser.go | |
parent | 63960fae0996c3dc09a55efab9654893190460d9 (diff) | |
parent | 8b63ca03ea3b1f005ee3b8ec516f30fd035d52cb (diff) | |
download | chat-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.go | 18 |
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 |