Hi All, I want to try out using EventMachine to pull back a bunch of rss and atom feeds. I wrote up some code to test this out, but I''m having some weird problems with it. Here''s an example trying to get my feed from feedburner EM.run do http = EM::Protocols::HttpClient2.connect("feeds.feedburner.com", 80) request = http.get("/PaulDixExplainsNothing") request.callback do puts request.status puts request.content EM.stop end end and the output: NO CLEN" "/PaulDixExplainsNothing" ["HTTP/1.0 200 OK", "Date: Tue, 27 Jan 2009 04:29:37 GMT", "Server: Apache", "X-FB-Host: app85", "Last-Modified: Thu, 22 Jan 2009 21:34:46 GMT", "ETag: ziEyTl4q9GH04BR4jgkImd0GvSE", "P3P: CP=\"ALL DSP COR NID CUR OUR NOR\"", "Connection: close", "Content-Type: text/xml;charset=utf-8"] It then freezes here and doesn''t stop. Can anyone point me to what might be going wrong? Thanks, Paul
looks like a bug to me--I''d probably go into the code and try to see how it''s parsing the HTTP. -=r On Mon, Jan 26, 2009 at 9:32 PM, Paul Dix <paul at pauldix.net> wrote:> Hi All, > I want to try out using EventMachine to pull back a bunch of rss and > atom feeds. I wrote up some code to test this out, but I''m having some > weird problems with it. > > Here''s an example trying to get my feed from feedburner > > EM.run do > http = EM::Protocols::HttpClient2.connect("feeds.feedburner.com", 80) > request = http.get("/PaulDixExplainsNothing") > request.callback do > puts request.status > puts request.content > EM.stop > end > end > > and the output: > NO CLEN" > "/PaulDixExplainsNothing" > ["HTTP/1.0 200 OK", "Date: Tue, 27 Jan 2009 04:29:37 GMT", "Server: > Apache", "X-FB-Host: app85", "Last-Modified: Thu, 22 Jan 2009 21:34:46 > GMT", "ETag: ziEyTl4q9GH04BR4jgkImd0GvSE", "P3P: CP=\"ALL DSP COR NID > CUR OUR NOR\"", "Connection: close", "Content-Type: > text/xml;charset=utf-8"] > > It then freezes here and doesn''t stop. Can anyone point me to what > might be going wrong? > > Thanks, > Paul > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >-- 2 Timothy 1:7
You might try this fork of my fork of the RFuzz HTTP client: http://github.com/arunthampi/evented_net/tree/master On Tue, Jan 27, 2009 at 11:05 AM, Roger Pack <rogerpack2005 at gmail.com>wrote:> looks like a bug to me--I''d probably go into the code and try to see > how it''s parsing the HTTP. > -=r > > On Mon, Jan 26, 2009 at 9:32 PM, Paul Dix <paul at pauldix.net> wrote: > > Hi All, > > I want to try out using EventMachine to pull back a bunch of rss and > > atom feeds. I wrote up some code to test this out, but I''m having some > > weird problems with it. > > > > Here''s an example trying to get my feed from feedburner > > > > EM.run do > > http = EM::Protocols::HttpClient2.connect("feeds.feedburner.com", 80) > > request = http.get("/PaulDixExplainsNothing") > > request.callback do > > puts request.status > > puts request.content > > EM.stop > > end > > end > > > > and the output: > > NO CLEN" > > "/PaulDixExplainsNothing" > > ["HTTP/1.0 200 OK", "Date: Tue, 27 Jan 2009 04:29:37 GMT", "Server: > > Apache", "X-FB-Host: app85", "Last-Modified: Thu, 22 Jan 2009 21:34:46 > > GMT", "ETag: ziEyTl4q9GH04BR4jgkImd0GvSE", "P3P: CP=\"ALL DSP COR NID > > CUR OUR NOR\"", "Connection: close", "Content-Type: > > text/xml;charset=utf-8"] > > > > It then freezes here and doesn''t stop. Can anyone point me to what > > might be going wrong? > > > > Thanks, > > Paul > > _______________________________________________ > > Eventmachine-talk mailing list > > Eventmachine-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/eventmachine-talk > > > > > > -- > 2 Timothy 1:7 > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >-- Tony Arcieri medioh.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/eventmachine-talk/attachments/20090127/de28ef27/attachment-0001.html>
There''s also http://github.com/igrigorik/em-http-request/tree/master Aman On Tue, Jan 27, 2009 at 10:28 AM, Tony Arcieri <tony at medioh.com> wrote:> You might try this fork of my fork of the RFuzz HTTP client: > > http://github.com/arunthampi/evented_net/tree/master > > On Tue, Jan 27, 2009 at 11:05 AM, Roger Pack <rogerpack2005 at gmail.com> > wrote: >> >> looks like a bug to me--I''d probably go into the code and try to see >> how it''s parsing the HTTP. >> -=r >> >> On Mon, Jan 26, 2009 at 9:32 PM, Paul Dix <paul at pauldix.net> wrote: >> > Hi All, >> > I want to try out using EventMachine to pull back a bunch of rss and >> > atom feeds. I wrote up some code to test this out, but I''m having some >> > weird problems with it. >> > >> > Here''s an example trying to get my feed from feedburner >> > >> > EM.run do >> > http = EM::Protocols::HttpClient2.connect("feeds.feedburner.com", 80) >> > request = http.get("/PaulDixExplainsNothing") >> > request.callback do >> > puts request.status >> > puts request.content >> > EM.stop >> > end >> > end >> > >> > and the output: >> > NO CLEN" >> > "/PaulDixExplainsNothing" >> > ["HTTP/1.0 200 OK", "Date: Tue, 27 Jan 2009 04:29:37 GMT", "Server: >> > Apache", "X-FB-Host: app85", "Last-Modified: Thu, 22 Jan 2009 21:34:46 >> > GMT", "ETag: ziEyTl4q9GH04BR4jgkImd0GvSE", "P3P: CP=\"ALL DSP COR NID >> > CUR OUR NOR\"", "Connection: close", "Content-Type: >> > text/xml;charset=utf-8"] >> > >> > It then freezes here and doesn''t stop. Can anyone point me to what >> > might be going wrong? >> > >> > Thanks, >> > Paul >> > _______________________________________________ >> > Eventmachine-talk mailing list >> > Eventmachine-talk at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/eventmachine-talk >> > >> >> >> >> -- >> 2 Timothy 1:7 >> _______________________________________________ >> Eventmachine-talk mailing list >> Eventmachine-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/eventmachine-talk > > > > -- > Tony Arcieri > medioh.com > > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >