ruby : refine HTTP cache feature (#3109)

* Use cache file when model host doesn't support if-modified-since

* Update gem date

* Revert "ruby : ignore "Downloading" output in test_log_suppress (#3106)"

This reverts commit edbd4cb7f5.
This commit is contained in:
KITAITI Makoto
2025-05-01 23:04:53 +09:00
committed by GitHub
parent 0778b6ff5f
commit 366082d072
3 changed files with 4 additions and 13 deletions

View File

@ -55,6 +55,8 @@ module Whisper
when Net::HTTPNotModified
# noop
when Net::HTTPOK
return if !response.key?("last-modified") && cache_path.exist?
download response
when Net::HTTPRedirection
request URI(response["location"]), headers