tenderlove/mechanize — Issue #210: Cookies
Author: Houdini
Created: 2012-03-01 14:25:48+00:00
State: open

I test my local site, and during redirect I set up cookie:

I, [2012-03-01T18:16:08.080351 #19490] INFO -- : Net::HTTP::Get: /auth_callback?temp_hash=570fc77e9e0dbbacb8262b6257274da261778e12
I, [2012-03-01T18:16:08.187161 #19490] INFO -- : status: Net::HTTPFound 1.1 302 Found
*D, [2012-03-01T18:16:08.187671 #19490] DEBUG -- : response-header: set-cookie => session_id=908c18b29e301f395ef52b487ebb2765; domain=mlife.local; path=/; HttpOnly*

And all is fine:

```ruby
p a.cookies # => [session_id=908c18b29e301f395ef52b487ebb2765]
```

But next request use any cookies

I, [2012-03-01T18:16:08.268307 #19490] INFO -- : Net::HTTP::Get: /
D, [2012-03-01T18:16:08.268386 #19490] DEBUG -- : request-header: accept => */*
D, [2012-03-01T18:16:08.268433 #19490] DEBUG -- : request-header: user-agent => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
D, [2012-03-01T18:16:08.268477 #19490] DEBUG -- : request-header: accept-encoding => gzip,deflate,identity
D, [2012-03-01T18:16:08.268570 #19490] DEBUG -- : request-header: accept-charset => ISO-8859-1,utf-8;q=0.7,*;q=0.7
D, [2012-03-01T18:16:08.268615 #19490] DEBUG -- : request-header: accept-language => en-us,en;q=0.5
D, [2012-03-01T18:16:08.268655 #19490] DEBUG -- : request-header: host => mlife.local
D, [2012-03-01T18:16:08.268695 #19490] DEBUG -- : request-header: if-modified-since => Thu, 01 Jan 1970 00:00:00 GMT
I, [2012-03-01T18:16:09.939104 #19490] INFO -- : status: Net::HTTPOK 1.1 200 OK

How to make it use cookies?
Thanks in advance