rapid7/metasploit-framework — pull request #3497 by jvazquez-r7 (2014-07-06 21:00:20+00:00)
Title: Allow get_cookies to find comma separated cookies

While reviewing #3463 I've found the actual ```Rex::Proto::Http::Response::get_cookies``` is failing to find comma separated cookies, as set by applications like Splunk 5.0.1 on Windows 7 (32 bits). Example:

```
Set-Cookie: cval=880350187, session_id_8000=83466b1a1a7a27ce13d35f78155d40ca3a1e7a28; expires=Mon, 07 Jul 2014 20:09:28 GMT; httponly; Path=/, uid=348637C4-9B10-485A-BFA9-5E892432FCFD; expires=Fri, 05-Jul-2019 20:09:28 GMT
```

In the case above, ```get_cookies``` fails to find the ```cval``` cookie, because it's separated with a comma from ```session_id_8000```:

```
msf > irb
[*] Starting IRB shell...

>> res = Rex::Proto::Http::Response.new
=> HTTP/1.1 200 OK
Content-Length: 0
>>
?> response = <<-HEREDOC
HTTP/1.1 200 OK
Expires: Thu, 26 Oct 1978 00:00:00 GMT
Content-Length: 8556
Server: CherryPy/3.1.2
Date: Sun, 06 Jul 2014 20:09:28 GMT
Cache-Control: no-store, max-age=0, no-cache, must-revalidate
Content-Type: text/html;charset=utf-8
Set-Cookie: cval=880350187, session_id_8000=83466b1a1a7a27ce13d35f78155d40ca3a1e7a28; expires=Mon, 07 Jul 2014 20:09:28 GMT; httponly; Path=/, uid=348637C4-9B10-485A-BFA9-5E892432FCFD; expires=Fri, 05-Jul-2019 20:09:28 GMT