Skip to content

Commit 3add701

Browse files
committed
66
1 parent 123c843 commit 3add701

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33
git_hash=$(git rev-parse --short HEAD 2>/dev/null)
4-
version="1.1.2-${git_hash}"
4+
version="1.1.3-${git_hash}"
55
echo "Build: AutoInstall-${version}"
66
go build -ldflags "-X main.gitversion=${version}" -o dist/$BUILD_NAME main.go
77
ls dist

core/download.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func normalDownload(url, filePath string, totalSize int64) error {
8787
if start > 0 {
8888
req.Header.Set("Range", "bytes="+strconv.FormatInt(start, 10)+"-")
8989
}
90-
//req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0 AutoInstall/"+gitversion)
90+
req.Header.Set("User-Agent", "autoinst/1.1.3")
9191

9292
client := &http.Client{}
9393
resp, err := client.Do(req)
@@ -165,7 +165,7 @@ func chunkDownload(url, filePath string, totalSize int64, chunkSize int64) error
165165

166166
req, _ := http.NewRequest("GET", url, nil)
167167
req.Header.Set("Range", fmt.Sprintf("bytes=%d-%d", downloaded, end))
168-
//req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0 AutoInstall/"+gitversion)
168+
req.Header.Set("User-Agent", "autoinst/1.1.3")
169169

170170
resp, err := client.Do(req)
171171
if err != nil {

0 commit comments

Comments
 (0)