Net::HTTP end of file reached

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

On Wed, Apr 27, 2011 at 6:11 PM, Erwin [email protected] wrote:

wrong on the server side ?
is there any way to test with another library ?

thanks for your feedback

When I try that URL in my browser I get a broken video icon. I think
your
URL is bad.

B.

Bryan C. wrote in post #995429:

On Wed, Apr 27, 2011 at 6:11 PM, Erwin [email protected] wrote:

wrong on the server side ?
is there any way to test with another library ?

thanks for your feedback

When I try that URL in my browser I get a broken video icon. I think
your
URL is bad.

B.

thanks for your feedback … I’ll get in touch with remote server
admin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs