From: William Crawford Date: 2006-09-13T00:10:43+09:00 Subject: Re: Fetching an URL using cookies Zouplaz wrote: > le 12/09/2006 13:09, William Crawford nous a dit: > I don't why but suddenly it worked... I presumed I've missed something > somewhere.. Experience tells me it'll suddenly stop again, don't fret ;) When I have something that stop and starts, I usually stop and gather the exact information being sent, byte for byte, from a success and a failure and compare it. Using LiveHttpHeaders (for firefox, here's an IE version with a name something like it) you can grab the exact headers, cookies (in the headers) and post data sent. Personally, I would take the time to set up a test I know works, and if it ever fails you again, you can run that test again and see what's different now. I'd even go as far as to record the headers for the test now, while it works, and save it for when it doesn't. (I'm not usually so proactive, but this could be a serious bear to debug without known-good headers/etc, and I'm lazy.) > Just for my own education, could this code be rewriten in a more elegant > way ? I'm not one to talk to about 'elegant' code... I'm more in the 'Hey, it works, right?' category. Hehe. > > Thanks Glad it works! Enjoy. -- Posted via http://www.ruby-forum.com/.