|
@@ -5,9 +5,7 @@ import (
|
|
|
"log"
|
|
|
"net/http"
|
|
|
"net/url"
|
|
|
- "os"
|
|
|
"path/filepath"
|
|
|
- "strconv"
|
|
|
"strings"
|
|
|
|
|
|
"imuslab.com/arozos/mod/common"
|
|
@@ -153,13 +151,15 @@ func serverMedia(w http.ResponseWriter, r *http.Request) {
|
|
|
//Fixing the header issue on Golang url encode lib problems
|
|
|
w.Header().Set("Content-Disposition", "attachment; filename*=UTF-8''"+filename)
|
|
|
}
|
|
|
- w.Header().Set("Content-Type", r.Header.Get("Content-Type"))
|
|
|
+ //w.Header().Set("Content-Type", r.Header.Get("Content-Type"))
|
|
|
|
|
|
//Serve content length by trying to get filesize
|
|
|
- fi, err := os.Stat(filepath.Clean(realFilepath))
|
|
|
- if err == nil {
|
|
|
- w.Header().Set("Content-Length", strconv.Itoa(int(fi.Size())))
|
|
|
- }
|
|
|
+ /*
|
|
|
+ fi, err := os.Stat(filepath.Clean(realFilepath))
|
|
|
+ if err == nil {
|
|
|
+ w.Header().Set("Content-Length", strconv.Itoa(int(fi.Size())))
|
|
|
+ }
|
|
|
+ */
|
|
|
}
|
|
|
|
|
|
http.ServeFile(w, r, realFilepath)
|