Browse Source
Merge pull request #1708 from fuyouyshengwu/master
Solve the Chinese name disorder of download file
pull/1720/head
Chris Lu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
weed/server/filer_server_handlers_read.go
|
@ -6,6 +6,7 @@ import ( |
|
|
"io" |
|
|
"io" |
|
|
"mime" |
|
|
"mime" |
|
|
"net/http" |
|
|
"net/http" |
|
|
|
|
|
"net/url" |
|
|
"path/filepath" |
|
|
"path/filepath" |
|
|
"strconv" |
|
|
"strconv" |
|
|
"strings" |
|
|
"strings" |
|
@ -121,6 +122,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request, |
|
|
setEtag(w, etag) |
|
|
setEtag(w, etag) |
|
|
|
|
|
|
|
|
filename := entry.Name() |
|
|
filename := entry.Name() |
|
|
|
|
|
filename = url.QueryEscape(filename) |
|
|
adjustHeaderContentDisposition(w, r, filename) |
|
|
adjustHeaderContentDisposition(w, r, filename) |
|
|
|
|
|
|
|
|
totalSize := int64(entry.Size()) |
|
|
totalSize := int64(entry.Size()) |
|
|