summaryrefslogtreecommitdiffstats
path: root/api/file.go
diff options
context:
space:
mode:
authorMaxim <mail@potapovmax.com>2015-10-13 10:15:44 +0300
committerMaxim <mail@potapovmax.com>2015-10-13 10:15:44 +0300
commit9d3248ccec89e533527bb86e082ef445c3cdfe7d (patch)
treefea41f942c66a2ae397ed12f1013585bcbf7775c /api/file.go
parent53d58fc3374268484a6eb5d8aae2c82719ec782d (diff)
parent0144b6fd8a95c6b65695b07483a528707dce1cfe (diff)
downloadchat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.gz
chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.bz2
chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.zip
Merge branch 'master' into PLT-590
Diffstat (limited to 'api/file.go')
-rw-r--r--api/file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/file.go b/api/file.go
index 9ebcd821b..429347596 100644
--- a/api/file.go
+++ b/api/file.go
@@ -408,11 +408,11 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Length", strconv.Itoa(len(f)))
w.Header().Del("Content-Type") // Content-Type will be set automatically by the http writer
- // attach extra headers to trigger a download on IE and Edge
+ // attach extra headers to trigger a download on IE, Edge, and Safari
ua := user_agent.New(r.UserAgent())
bname, _ := ua.Browser()
- if bname == "Edge" || bname == "Internet Explorer" {
+ if bname == "Edge" || bname == "Internet Explorer" || bname == "Safari" {
// trim off anything before the final / so we just get the file's name
parts := strings.Split(filename, "/")