Doing a check on a remote file url, using Net::HTTP, I get an ‘end of
file reached’
here is the Ruby code (1.9.2) [env ; Rails3 , webrick ]
url = URI.parse(URI.escape(test_upload.videoUrl))
req = Net::HTTP::Head.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req) }
if res.code == “200”
puts “OK we can get the clip”
I don’t get the response …
url:
http://video.vertexdigitalsports.com//sitehome/site41/userUpload/IDab31abe3-f2de-4ba9-bcc8-a9417fa882f5/swingcombined534Out.mp4
rake aborted!
end of file reached
seems the connection is over on this file…
I tried to add : req.add_field(‘Connection’, ‘keep-alive’)
but always the same error …
trying to get it via my browser raises the same error… what could be
wrong on the server side ?
is there any way to test with another library ?
thanks for your feedback