From: Yohanes Santoso Date: 2002-03-08T23:59:53+09:00 Subject: Re: net/http; 302 Tobias Reif writes: > "Oops... > Your browser is not accepting our cookies. To view this page, please set > your browser preferences to accept cookies (code 0)." > > Can my Net::HTTP program accept cookies in some way? resp, data = Net::HTTP("someurl", 80) cookie = resp["Cookie"] Setting the cookie: In the header part of your reply, simply add another header: Set-Cookie: [special format] You'll be better off reading the Cookie thingie in HTTP RFC. Or you can use the cgi-lib.rb which have some useful method: == make raw cookie string require "cgi-lib.rb" cookie1 = CGI::cookie({'name' => 'name', 'value' => 'value', 'path' => 'path', # optional 'domain' => 'domain', # optional 'expires' => Time.now, # optional 'secure' => true # optional }) Also, please look at http://www.htmlhelp.com/faq/cgifaq.html which contains CGI FAQ which although not what you're building, contains some useful information about authentication, cookies, nph, etc. YS.