Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6208e8

Browse files
committed
fixup downloader
1 parent9e1a956 commite6208e8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎Coder Desktop/VPNLib/Downloader.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ public actor Downloader {
117117
varreq=URLRequest(url: src)
118118
ifFileManager.default.fileExists(atPath: dest.path){
119119
iflet existingFileData=try?Data(contentsOf: dest){
120-
letsha1Hash=Insecure.SHA1.hash(data: existingFileData)
121-
letetag= sha1Hash.map{String(format:"%02x", $0)}.joined()
122-
// ETag header needs to be quoted
123-
req.setValue("\"\(etag)\"", forHTTPHeaderField:"If-None-Match")
120+
req.setValue(etag(data: existingFileData), forHTTPHeaderField:"If-None-Match")
124121
}
125122
}
126123
// TODO: Add Content-Length headers to coderd, add download progress delegate

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp