summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorStas Vovk <stas@vovk.me>2015-10-12 21:54:51 +0300
committerStas Vovk <stas@vovk.me>2015-10-12 21:54:51 +0300
commitbafb341015e6a9aaba878bec8126fcc825531015 (patch)
tree1312efa11b3435205d2d31818a0f2ce91269373c /api
parentb5a499977ec212139444974255a27f8e66d0befd (diff)
parent246d934e5e557555645a1d26ae005be452ecbd2d (diff)
downloadchat-bafb341015e6a9aaba878bec8126fcc825531015.tar.gz
chat-bafb341015e6a9aaba878bec8126fcc825531015.tar.bz2
chat-bafb341015e6a9aaba878bec8126fcc825531015.zip
Merge remote-tracking branch 'upstream/master' into PLT-589
Diffstat (limited to 'api')
-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, "/")