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 =
    res = Net::HTTP.start(, url.port) {|http|
http.request(req) }
    if res.code == "200"
      puts "OK we can get the clip"

I don't get the response ...
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

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


Bryan Crossland wrote in post #995429: