Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
MKCLOS
Core Development Platform
coreospackage
Merge requests
!41
Added query string in source path to burst cache
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added query string in source path to burst cache
DownloadHelper_CacheBurst
into
master
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
Onkar Sutar
requested to merge
DownloadHelper_CacheBurst
into
master
7 years ago
Overview
0
Commits
2
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
version 1
f6daea48
7 years ago
master (base)
and
latest version
latest version
08025bae
2 commits,
7 years ago
version 1
f6daea48
1 commit,
7 years ago
1 file
+
8
−
1
Expand all files
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
downloadhelper/downloadHelper.go
+
8
−
1
Options
@@ -4,6 +4,7 @@ import (
"errors"
"path"
"path/filepath"
"strconv"
"strings"
"time"
@@ -29,7 +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
}
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"
)
Menu
Explore
Projects
Groups
Topics
Snippets