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

> 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
>
>
When I try that URL in my browser I get a broken video icon. I think your
URL is bad.

B.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to