Skip to content

Commit 0a54bfa

Browse files
authored
bug fix token download
1 parent 6808f55 commit 0a54bfa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fileserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ func (this *Server) Download(w http.ResponseWriter, r *http.Request) {
570570
}
571571

572572
}
573+
574+
573575

574576
CheckToken := func(token string, md5sum string, timestamp string) bool {
575577
if this.util.MD5(md5sum+timestamp) != token {
@@ -579,6 +581,7 @@ func (this *Server) Download(w http.ResponseWriter, r *http.Request) {
579581
}
580582

581583
if Config().DownloadUseToken {
584+
fullpath= strings.Split(fullpath,"?")[0]
582585
pathMd5 = this.util.MD5(fullpath)
583586
if fileInfo, err = this.GetFileInfoFromLevelDB(pathMd5); err != nil {
584587
log.Error(err)

0 commit comments

Comments
 (0)