Commit 08025bae authored by Onkar Sutar's avatar Onkar Sutar
Browse files

changes

parent f6daea48
Branches
1 merge request!41Added query string in source path to burst cache
Showing with 2 additions and 2 deletions
......@@ -30,13 +30,13 @@ const (
func DownloadFile(sourcePath, destinationPath, jwtToken string, retryCnt int) (bool, error) {
logginghelper.LogDebug("IN : DownloadFile")
destinationPath = filehelper.CleanPath(destinationPath)
logginghelper.LogDebug("DownloadFile : Downloding ", sourcePath, " at ", destinationPath)
mkclCacheBurst := strconv.FormatInt(time.Now().UnixNano(), 10)
if strings.Contains(sourcePath, "?") {
sourcePath = sourcePath + "&&mkclCacheBurst=" + mkclCacheBurst
sourcePath = sourcePath + "&mkclCacheBurst=" + mkclCacheBurst
} else {
sourcePath = sourcePath + "?mkclCacheBurst=" + mkclCacheBurst
}
logginghelper.LogDebug("DownloadFile : Downloading ", sourcePath, " at ", destinationPath)
if strings.Trim(sourcePath, EMPTY_STR) == EMPTY_STR || strings.Trim(destinationPath, EMPTY_STR) == EMPTY_STR || !strings.HasPrefix(sourcePath, HTTP_PROTOCOL) {
logginghelper.LogDebug("DownloadFile : sourcePath is empty")
logginghelper.LogDebug("OUT : DownloadFile")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment