Craig White
2008-Jan-28 23:51 UTC
[iCalendar-devel] newbie - problem parsing the ''status''
This is what''s happening in script/console... require ''icalendar'' => [] require ''net/http'' => [] cal ''https://name:passwd at myserver/ics.php?c=5be410ec5238fc93c1f66b1a935365c9'' url = URI.parse cal => #<URI::HTTPS:0xfdb986e8e URL:https://...> req = Net::HTTP::Get.new(url.path) => #<Net::HTTP::Get GET> res = Net::HTTP.start(url.host, url.port) {|http|http.request(req) } Net::HTTPBadResponse: wrong status line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">" from /usr/lib/ruby/1.8/net/http.rb:2022:in `read_status_line'' from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'' from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'' from (irb):13 from /usr/lib/ruby/1.8/net/http.rb:543:in `start'' from /usr/lib/ruby/1.8/net/http.rb:440:in `start'' from (irb):13 Does this mean that my ical file is improper? I can load this with other programs (iCal, Sunbird, Korganizer, etc.) I''m confused Craig
Craig White
2008-Jan-29 17:08 UTC
[iCalendar-devel] newbie - problem parsing the ''status''
On Mon, 2008-01-28 at 16:51 -0700, Craig White wrote:> This is what''s happening in script/console... > > require ''icalendar'' > => [] > > require ''net/http'' > => [] > > cal > ''https://name:passwd at myserver/ics.php?c=5be410ec5238fc93c1f66b1a935365c9'' > > url = URI.parse cal > => #<URI::HTTPS:0xfdb986e8e URL:https://...> > > req = Net::HTTP::Get.new(url.path) > => #<Net::HTTP::Get GET> > > res = Net::HTTP.start(url.host, url.port) {|http|http.request(req) } > Net::HTTPBadResponse: wrong status line: "<!DOCTYPE HTML PUBLIC > \"-//IETF//DTD HTML 2.0//EN\">" > from /usr/lib/ruby/1.8/net/http.rb:2022:in `read_status_line'' > from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'' > from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'' > from (irb):13 > from /usr/lib/ruby/1.8/net/http.rb:543:in `start'' > from /usr/lib/ruby/1.8/net/http.rb:440:in `start'' > from (irb):13 > > Does this mean that my ical file is improper? > > I can load this with other programs (iCal, Sunbird, Korganizer, etc.) > > I''m confused---- OK, I think the file might be acceptable but apparently net/http is stumbling on my self-signed certificates which by my read of ruby''s net/http, there''s no mechanism to deal with a self-signed certificate. Anyone with clues would be appreciated Craig