Re: [Httpmail-devel] Ruby error:
Status: Beta
Brought to you by:
fuzz
From: Dave D. <dav...@ho...> - 2002-11-13 22:09:42
|
You said you installed nqxml to get uri.rb? uri.rb got included with the Ruby standard library at some point, so you shouldn't need nqxml. Maybe that's causing a conflict, I don't know. PROPFIND is a WebDAV method. Basically it's an HTTP POST by a different name. There's some voodoo at the top of dav.rb that lets the HTTP guy know how to process it. Ruby is a dynamic language, so the following line: res = http_con.method(req_method.downcase).call(path_query, req_data, headers) (where req_method is 'PROPFIND') tells the Ruby compiler to call the method propfind(path_query, req_data, headers). It's sorta like reflection in Java, RTTI in C++, etc. For learning more about Ruby, I recommend the book Programming Ruby by Dave Thomas and Andrew Hunt. Dave Thomas is one of the most active members in the Ruby community and he's an all around nice guy (I've met him twice). The book is available online at http://www.rubycentral.com/book/ (the dns for the domain is messed up, so try http://165.193.123.250/book/ if that doesn't work). Dave ----Original Message Follows---- From: "Dane G. Avilla" <da...@av...> Reply-To: dan...@av... To: "Dave Dunkin" <dav...@ho...> CC: htt...@so... Subject: Re: [Httpmail-devel] Ruby error: Date: Wed, 13 Nov 2002 16:04:51 -0500 On Wednesday, November 13, 2002, at 12:41 PM, Dave Dunkin wrote: >10.2 comes with Ruby 1.6.7 installed (that's the one in /usr/lib/ruby). It >shouldn't hurt anything to have Ruby installed twice in different >locations, just be sure you know which one is executing. Ok, thx for the info. I ended up blowing away the new version I had built (in /usr/local/lib/ruby) and reinstalled XMLParser and nqxml just to be safe. Unfortunately, I'm still getting the cookie error. I've been looking over the code, and I've been able to figure out that the error is caused by calling extract_cookies(res) where res == nil, but beyond that, I'm lost. >The cookies error is not related to the MD5 error. I haven't seen the >cookies error before. I haven't tested thm.rb in a while either. See if you >can get it to work with gethttpmail.rb. Unfortunately, the cookie error is manifested using both gethttpmail.rb and thm.rb since they both work basically the same way. Looking at the stack trace from the crash (reported in an earlier email), I see this line in the trace and it's a little confusing . . . : dav.rb(285): res = @session.http_wrap('PROPFIND', @uri, {}, doc.to_s) I guess I'm a little confused at what 'PROPFIND' is, or what it does. In http_wrap(), the 'PROPFIND' object has the downcase property invoked on it: dav.rb(134): res = http_con.method(req_method.downcase).call(path_query, req_data, headers) and that call is apparently being directed to propfind() at dav.rb(55), but I don't understand how PROPFIND is mapped to propfind(), and where arguments for propfind() are located . . . Remember, I'm a Ruby novice :) Any pointers you can give, or places you can recommend where I can learn more on my own would be appreciated. Cheers, -Dane _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus |