HTTP/2 head requests expect body.
ioquatix opened this issue · 0 comments
ioquatix commented
0.3s error: Bake::Command [ec=0xb54] [pid=47378] [2023-06-26 10:34:10 +0900]
| EOFError: Expected 5142 bytes, 5142 bytes short!
| → /Users/samuel/.gem/ruby/3.2.1/gems/async-http-0.60.2/lib/async/http/protocol/http2/input.rb:32 in `read'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/readable.rb:69 in `each'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/buffered.rb:31 in `for'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/readable.rb:64 in `finish'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/wrapper.rb:28 in `finish'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/completable.rb:29 in `finish'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/wrapper.rb:28 in `finish'
| /Users/samuel/.gem/ruby/3.2.1/gems/protocol-http-0.24.3/lib/protocol/http/body/reader.rb:36 in `finish'
| bake/modernize/gemspec.rb:187 in `block in valid_uri?'
| /Users/samuel/.gem/ruby/3.2.1/gems/async-2.6.2/lib/async/task.rb:180 in `block in run'
| /Users/samuel/.gem/ruby/3.2.1/gems/async-2.6.2/lib/async/task.rb:350 in `block in schedule'
from
def valid_uri?(uri)
Sync do
internet = Async::HTTP::Internet.new
response = internet.head(uri)
response.finish
response.success?
end
end