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 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Apr 27, 2011 at 6:11 PM, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bryan Crossland wrote in post #995429:> On Wed, Apr 27, 2011 at 6:11 PM, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> 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 -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.