From: William Crawford Date: 2006-09-12T20:09:42+09:00 Subject: Re: Fetching an URL using cookies Zouplaz wrote: > I'm trying to fetch an url which needs several cookies to be set in > order to properly return a result. > The problem is that I'm not sure it the way I repost the cookies is > right or not. The cookies retrieved by the unless block ARE OK but when > the second @http.get occurs, the remote web server ignore them and send > a redirect to a default page. Why not -try- to manufacture them yourself and see if it works? If it does, you know how to send them and can just make sure the newly-obtained cookies are sent the same way. If it doesn't, massage it until it does work. > So, I need to be sure that I send cookies properly in the GET request > before investigating the cookies's content Right. > Note : when rewiewing this post I think I should write some code to keep > the cookies's content between two calls (as a browser do) instead of > handling things the way I do. But it's juste a side note Yes, good idea. Another thought, however. Perhaps the page has additional requirements that you haven't met. Cookies that don't exist on the other page, but were set at login or somewhere else. Headers that you aren't sending and it expects. A specific refering page. (Or something else I've momentarily forgotten.) -- Posted via http://www.ruby-forum.com/.