diff options
author | Corey Hulen <corey@hulen.com> | 2015-10-12 11:29:05 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-10-12 11:29:05 -0700 |
commit | 2d4d25051ea42a97e4a3b8ac054af3cadefde711 (patch) | |
tree | d7383e4afb77a805257d17203213cd652fe541c0 | |
parent | f55416d9f45afcb310246426366cd261f138029f (diff) | |
parent | e5a019390d91890bd098511f4845e27ff7bda430 (diff) | |
download | chat-2d4d25051ea42a97e4a3b8ac054af3cadefde711.tar.gz chat-2d4d25051ea42a97e4a3b8ac054af3cadefde711.tar.bz2 chat-2d4d25051ea42a97e4a3b8ac054af3cadefde711.zip |
Merge pull request #1000 from hmhealey/plt604
PLT-604 Fixed download links in Safari
-rw-r--r-- | api/file.go | 4 |
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, "/") |