Skip to content

Commit d15bf31

Browse files
committed
Use cache file when model host doesn't support if-modified-since
1 parent 0778b6f commit d15bf31

File tree

1 file changed

+2
-0
lines changed
  • bindings/ruby/lib/whisper/model

1 file changed

+2
-0
lines changed

bindings/ruby/lib/whisper/model/uri.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def request(uri, headers)
5555
when Net::HTTPNotModified
5656
# noop
5757
when Net::HTTPOK
58+
return if !response.key?("last-modified") && cache_path.exist?
59+
5860
download response
5961
when Net::HTTPRedirection
6062
request URI(response["location"]), headers

0 commit comments

Comments
 (0)